httperror

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New added in v0.1.0

func New(args ...interface{}) error

func Serve added in v0.1.0

func Serve(w http.ResponseWriter, err error)

func StdHandler added in v0.1.0

func StdHandler(h Handler) http.Handler

Types

type Error added in v0.1.0

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

func Wrap added in v0.1.0

func Wrap(err error, code int) *Error

func (Error) Code added in v0.1.0

func (e Error) Code() int

func (*Error) ServeHTTP added in v0.1.0

func (e *Error) ServeHTTP(w http.ResponseWriter, _ *http.Request)

type HTTPError

type HTTPError interface {
	Error() string
	Code() int
}

type Handler added in v0.1.0

type Handler interface {
	ServeHTTP(w http.ResponseWriter, r *http.Request) error
}

Jump to

Keyboard shortcuts

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