utils

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteErr

func WriteErr(w http.ResponseWriter, err error)

WriteErr interprets the given error as one of the errors defined in errors package and writes the error response.

func WriteJSON

func WriteJSON(w http.ResponseWriter, status int, v interface{})

WriteJSON writes 'v' to response-writer in JSON format.

func WriteLn

func WriteLn(w http.ResponseWriter, status int, b []byte)

Types

This section is empty.

Jump to

Keyboard shortcuts

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