internal

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2021 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 NewErrorNoResponderFoundWrongMethod added in v1.1.0

func NewErrorNoResponderFoundWrongMethod(orig, suggested string) error

NewErrorNoResponderFoundWrongMethod returns an ErrorNoResponderFoundWrongMethod.

func SetSubmatches

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

Types

type ErrorNoResponderFoundWrongMethod added in v1.1.0

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

errorNoResponderFoundMethodCase encapsulates a NoResponderFound error probably due to the method not upper-cased.

func (*ErrorNoResponderFoundWrongMethod) Error added in v1.1.0

Error implements error interface.

func (*ErrorNoResponderFoundWrongMethod) Unwrap added in v1.1.0

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