Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsFromLocalhost ¶
func MapToStruct ¶
MapToStruct deserializes a map[string]any back into a typed struct pointer. Returns nil if m is nil or empty.
func PrettyJSON ¶
func PrettyJSON(v any) json.RawMessage
func StructToMap ¶
StructToMap serializes a pointer to any json-tagged struct into a map[string]any. Returns nil if v is nil.
func WriteJSONResponse ¶
func WriteJSONResponse(w http.ResponseWriter, status int, v any) error
Types ¶
type SplitLevelHandler ¶
SplitLevelHandler routes log records to stdout for levels below Error, and to stderr for Error and above.
Click to show internal directories.
Click to hide internal directories.