Versions in this module Expand all Collapse all v2 v2.3.1 Jan 29, 2026 Changes in this version + func AddContentEncoding(w http.ResponseWriter, encoding string) + func BadRequest(w http.ResponseWriter, msg ...string) + func CheckReqPost(w http.ResponseWriter, r *http.Request) bool + func Copy(dst io.Writer, src io.Reader) (written int64, err error) + func CopyBuffer(dst io.Writer, src io.Reader, buf []byte) (written int64, err error) + func Forbidden(w http.ResponseWriter, msg ...string) + func FormDataDecodeResp[T any](w http.ResponseWriter, r *http.Request, sizes ...int64) (*T, bool) + func InternalServerError(w http.ResponseWriter) + func JsonDecodePtrResp[T interface{ ... }, E any](w http.ResponseWriter, r *http.Request) (T, bool) + func JsonDecodeResp[T any](w http.ResponseWriter, r *http.Request) (T, bool) + func MethodNotAllow(w http.ResponseWriter) + func NotFound(w http.ResponseWriter, msg ...string) + func ParseRequestBodyAsAnySliceAndLength(w http.ResponseWriter, r *http.Request) ([]any, int, error) + func Play(path string, w http.ResponseWriter, r *http.Request, args ...any) + func PostQueryFieldWithValidRegexp(w http.ResponseWriter, r *http.Request, field string, rule *regexp.Regexp) (string, bool) + func QueryFieldWithValidRegexp(w http.ResponseWriter, r *http.Request, field string, rule *regexp.Regexp) (string, bool) + func ReqError(r *http.Request, i ...any) + func RespErrWithCode(w http.ResponseWriter, r *http.Request, respInfo RespCode, err error, d ...any) + func RespJson(w http.ResponseWriter) + func RespWithCode(w http.ResponseWriter, respInfo RespCode, d ...any) + func SetDownloadBytes(w http.ResponseWriter, r *http.Request, b *[]byte, fileName string) + func SetReturn(w http.ResponseWriter, code int, msg ...any) + func SetReturnCheckErr(w http.ResponseWriter, r *http.Request, err error, code int, msg any, ...) + func SetReturnCheckErrDisableLog(w http.ResponseWriter, r *http.Request, err error, code int, msg any, ...) + func SetReturnCheckErrWithoutError(w http.ResponseWriter, r *http.Request, err error, code int, msg any, ...) + func SetReturnCode(w http.ResponseWriter, r *http.Request, code int, msg any, data ...any) + func SetReturnData(w http.ResponseWriter, code int, msg any, data ...any) + func SetReturnError(w http.ResponseWriter, r *http.Request, err error, code int, msg ...any) + func SetReturnErrorDisableLog(w http.ResponseWriter, err error, code int, msg ...any) + func SetReturnFile(w http.ResponseWriter, r *http.Request, file string) + func SetReturnWithoutError(w http.ResponseWriter, r *http.Request, err error, code int, msg ...any) + func Status(w http.ResponseWriter, code int, msg ...string) + func Unauthorized(w http.ResponseWriter, msg ...string) + type DataList struct + List []*T + Total int64 + type RespCode interface + EnableLog func() bool + HttpCode func() int + Message func() string + RespCode func() int v2.3.0 Dec 9, 2025