Documentation ¶
Index ¶
- func WriteDefaultHeaders(w http.ResponseWriter, contentType string)
- func WriteError(w http.ResponseWriter, msg string)
- func WriteHTML(w http.ResponseWriter, output []byte)
- func WriteJSON(w http.ResponseWriter, output interface{})
- func WriteRaw(w http.ResponseWriter, contentType string, output []byte)
- func WriteTemplate(w http.ResponseWriter, tmpl *template.Template, ctx interface{})
- func WriteText(w http.ResponseWriter, output []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteDefaultHeaders ¶
func WriteDefaultHeaders(w http.ResponseWriter, contentType string)
WriteDefaultHeaders writes default headers to the HTTP response.
func WriteError ¶
func WriteError(w http.ResponseWriter, msg string)
WriteError writes an error to the HTTP response.
func WriteHTML ¶
func WriteHTML(w http.ResponseWriter, output []byte)
WriteHTML writes raw HTML to the HTTP response.
func WriteJSON ¶
func WriteJSON(w http.ResponseWriter, output interface{})
WriteJSON writes raw JSON to the HTTP response.
func WriteRaw ¶
func WriteRaw(w http.ResponseWriter, contentType string, output []byte)
WriteRaw writes the specified content type to the HTTP response.
func WriteTemplate ¶
func WriteTemplate(w http.ResponseWriter, tmpl *template.Template, ctx interface{})
WriteTemplate writes the given template to the HTTP response.
func WriteText ¶
func WriteText(w http.ResponseWriter, output []byte)
WriteText writes raw plain-text to the HTTP response.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.