internal

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoResponderFound = errors.New("no responder found") // nolint: revive

NoResponderFound is returned when no responders are found for a given HTTP method and URL.

Functions

func CheckStackTracer

func CheckStackTracer(req *http.Request, err error) error

CheckStackTracer checks for specific error returned by NewNotFoundResponder function or Trace Responder method.

func GetSubmatches

func GetSubmatches(req *http.Request) []string

func SetSubmatches

func SetSubmatches(req *http.Request, submatches []string) *http.Request

Types

type ErrorNoResponderFoundMistake added in v1.2.0

type ErrorNoResponderFoundMistake struct {
	Kind      string // "method", "URL" or "matcher"
	Orig      string // original wrong method/URL, without any matching responder
	Suggested string // suggested method/URL with a matching responder
}

ErrorNoResponderFoundMistake encapsulates a NoResponderFound error probably due to a user error on the method or URL path.

func (*ErrorNoResponderFoundMistake) Error added in v1.2.0

Error implements error interface.

func (*ErrorNoResponderFoundMistake) Unwrap added in v1.2.0

func (e *ErrorNoResponderFoundMistake) Unwrap() error

Unwrap implements the interface needed by errors.Unwrap.

type RouteKey

type RouteKey struct {
	Method string
	URL    string
}
var NoResponder RouteKey

func (RouteKey) String

func (r RouteKey) String() string

type StackTracer

type StackTracer struct {
	CustomFn func(...interface{})
	Err      error
}

func (StackTracer) Error

func (s StackTracer) Error() string

Error implements error interface.

func (StackTracer) Unwrap added in v1.1.0

func (s StackTracer) Unwrap() error

Unwrap implements the interface needed by errors.Unwrap.

Jump to

Keyboard shortcuts

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