helper

package
v1.9.14 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MimeTypeNOSNIFF = "nosniff"
)

Variables

This section is empty.

Functions

func JSONError

func JSONError(w http.ResponseWriter, err *Error, code int)

func WriteError

func WriteError(w http.ResponseWriter, r *http.Request, err string, code int)

Types

type Error

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

func NewError

func NewError(error string) *Error

func (*Error) Error

func (e *Error) Error() string

func (*Error) MarshalJSON

func (e *Error) MarshalJSON() ([]byte, error)

func (*Error) String

func (e *Error) String() string

Jump to

Keyboard shortcuts

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