Versions in this module Expand all Collapse all v0 v0.0.1 Sep 15, 2025 Changes in this version + const CONTENT_TYPE_JSON + const CONTENT_TYPE_TEXT + const JSON + const Text + func Failure(w http.ResponseWriter, contentType string, message []byte, statusCode int) + func Success(w http.ResponseWriter, contentType string, body []byte) + type ContentFormatter interface + Failure func(w http.ResponseWriter, body any, statusCode int) error + Success func(w http.ResponseWriter, body any) error + type Error struct + func NewError(msg string) *Error + func WrapError(err error, msg string) *Error + func (e *Error) Error() string + func (e *Error) Unwrap() error + type JSONFormatter string + func (f JSONFormatter) Failure(w http.ResponseWriter, body any, statusCode int) error + func (f JSONFormatter) Success(w http.ResponseWriter, body any) error + type TextFormatter string + func (f TextFormatter) Failure(w http.ResponseWriter, body any, statusCode int) error + func (f TextFormatter) Success(w http.ResponseWriter, body any) error