ws

package
v0.0.0-...-2be0f72 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteError

func WriteError(err error, writer http.ResponseWriter)

WriteError writes the specified error to the writer. It translates the error to a HTTP status code.

Types

type HTTPError

type HTTPError struct {
	// contains filtered or unexported fields
}

HTTPError is the error and message to respond with.

func ToHTTPError

func ToHTTPError(err error) *HTTPError

ErrorToHTTPError translates an error to an HTTPError. It translates an error to an HTTP status code.

func (*HTTPError) Write

func (e *HTTPError) Write(response http.ResponseWriter)

Write writes the HTTPError to the ResponseWriter

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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