Documentation ¶
Overview ¶
Package reserr writes useful JSON message on HTTP error.
Index ¶
- func InvalidPath(w http.ResponseWriter, r *http.Request)
- func NotImplemented(w http.ResponseWriter, r *http.Request)
- func Write(w http.ResponseWriter, r *http.Request, statusCode int, a ...any)
- type ResErr
- func (resErr ResErr) InvalidPath(w http.ResponseWriter, r *http.Request)
- func (resErr ResErr) NotImplemented(w http.ResponseWriter, r *http.Request)
- func (resErr ResErr) SafeWrite(w http.ResponseWriter, r *http.Request, statusCode int, messages ...any)
- func (resErr ResErr) Write(w http.ResponseWriter, r *http.Request, statusCode int, messages ...any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InvalidPath ¶
func InvalidPath(w http.ResponseWriter, r *http.Request)
func NotImplemented ¶
func NotImplemented(w http.ResponseWriter, r *http.Request)
Types ¶
type ResErr ¶
type ResErr string
func (ResErr) InvalidPath ¶
func (resErr ResErr) InvalidPath(w http.ResponseWriter, r *http.Request)
func (ResErr) NotImplemented ¶
func (resErr ResErr) NotImplemented(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.