herr

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2020 License: ISC Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToHttpCode

func ToHttpCode(err error, defaultStatus int) int

ToHttpCode returns a status code indicated by an HttpError or a default status if the error is not an HttpError instance

Types

type HttpError

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

HttpError represents an error that indicates an HTTP status

func NewHttpError

func NewHttpError(err error, status int) HttpError

Jump to

Keyboard shortcuts

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