Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Error ¶
func Error(err error) http.HandlerFunc
Error is a shortcut for converting custom error types into appropriate response codes and JSON
func JSON ¶
func JSON(obj interface{}) http.HandlerFunc
JSON is a shortcut for writing JSON api responses
func JSONorErr ¶
func JSONorErr(obj interface{}, err error) http.HandlerFunc
JSONorErr is a simple helper to handle the last `if err != nil` check in a handler
func SuccessOrErr ¶
func SuccessOrErr(err error) http.HandlerFunc
SuccessOrErr is a simple helper to handle the last `if err != nil` check in a handler
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.