Documentation
¶
Overview ¶
Package write provides http-related functions, types, utilities, etc. The package name was deliberately chosen so as to not conflict with net/http, as these two packages are bound to be used together.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeJSON ¶
func EncodeJSON(w http.ResponseWriter, v interface{})
EncodeJSON conveniently writes JSON data responses.
Types ¶
type ErrorResponse ¶
type ErrorResponse struct { Status int `json:"status"` StatusText string `json:"statusText"` Error string `json:"error"` }
ErrorResponse provides a standard error response format.
type OKResponse ¶
Click to show internal directories.
Click to hide internal directories.