//
pkg.gl
Category
github.com/sapcc/go-bits
respondwith
package
0.0.0-20250307173044-634e8ce82c05
Repository:
https://github.com/sapcc/go-bits.git
Documentation:
pkg.go.dev
Overview
Versions
1
Dependencies
3
Dependents
13
Files
30 SLOC
#
Functions
ErrorText
ErrorText produces an error response with HTTP status code 500 and Content-Type text/plain if the given error is non-nil.
JSON
JSON serializes the given data into an HTTP response body The `code` argument specifies the HTTP response code, usually 200.