Documentation ¶
Index ¶
- Variables
- func Body(r *http.Request, into any) error
- func Header[T any](r *http.Request, key string, defaultValue T) T
- func HeaderOrQuery[T any](r *http.Request, key string, defaultValue T) T
- func Path[T any](r *http.Request, key string, defaultValue T) T
- func Query[T any](r *http.Request, key string, defaultValue T) T
- func ValueOrDefault[T any](val string, defaultValue T) T
- type ListOptions
- type PathVar
- type PathVarList
Constants ¶
This section is empty.
Variables ¶
View Source
var PathVarsFunc = func(r *http.Request) PathVarList { return nil }
Functions ¶
func ValueOrDefault ¶
nolint: forcetypeassert,gomnd,ifshort ValueOrDefault return default value if empty string
Types ¶
type ListOptions ¶
type PathVarList ¶
type PathVarList []PathVar
func PathVars ¶
func PathVars(r *http.Request) PathVarList
func (PathVarList) Get ¶
func (p PathVarList) Get(key string) string
func (PathVarList) Map ¶
func (p PathVarList) Map() map[string]string
Click to show internal directories.
Click to hide internal directories.