Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeInto ¶ added in v1.0.0
Can be called when already having a var of type T. Unmarshals data into the target.
func Write ¶ added in v1.0.0
func Write(w http.ResponseWriter, s int, v any) error
A func that can be used in handlers to write JSON. Includes status code and structured data to marshall.
func WriteWithFallback ¶ added in v1.1.6
func WriteWithFallback(w http.ResponseWriter, s int, v any)
WriteWithFallback writes JSON, and if it fails, writes a simple HTTP error.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.