helper

package
v1.6.10 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 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