Documentation ¶
Overview ¶
Responder as a wrapper of https://github.com/unrolled/render -- This is a good base to work off and extend for your own uses, or build your own. For example, adding pagination to JSON() where you add a "Link" header that is a cursor URL to the next page of results (check how GitHubb does it in their API docs). The power is yours.
Index ¶
- Variables
- func Data(w http.ResponseWriter, status int, v []byte) error
- func HTML(w http.ResponseWriter, status int, name string, binding interface{}, ...) error
- func JSON(w http.ResponseWriter, status int, v interface{}) error
- func JSONP(w http.ResponseWriter, status int, callback string, v interface{}) error
- func Render(w http.ResponseWriter, e renderer.Engine, data interface{}) error
- func Text(w http.ResponseWriter, status int, v string) error
- func XML(w http.ResponseWriter, status int, v interface{}) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Renderer *renderer.Render
)
Functions ¶
func HTML ¶
func HTML(w http.ResponseWriter, status int, name string, binding interface{}, htmlOpt ...renderer.HTMLOptions) error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.