util

package
v0.0.0-...-5594105 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL