README ¶ http respond Expand ▾ Collapse ▴ Documentation ¶ Overview ¶ Package respond provides common http response functionality Index ¶ func WithJSON(w gohttp.ResponseWriter, r *gohttp.Request, resp interface{}) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func WithJSON ¶ func WithJSON(w gohttp.ResponseWriter, r *gohttp.Request, resp interface{}) WithJSON makes a new json response based on a given response interface If provided resp is of type errors.Error error response will be made, otherwise provider resp will be json encoded and written to w Types ¶ This section is empty. Source Files ¶ View all Source files respond.go Click to show internal directories. Click to hide internal directories.