Documentation ¶
Overview ¶
Package params 获取和转换路由中的参数信息
Index ¶
- Variables
- func WithValue(r *http.Request, ps Params) *http.Request
- type Params
- func (p Params) Bool(key string) (bool, error)
- func (p Params) Exists(key string) bool
- func (p Params) Float(key string) (float64, error)
- func (p Params) Int(key string) (int64, error)
- func (p Params) MustBool(key string, def bool) bool
- func (p Params) MustFloat(key string, def float64) float64
- func (p Params) MustInt(key string, def int64) int64
- func (p Params) MustString(key, def string) string
- func (p Params) MustUint(key string, def uint64) uint64
- func (p Params) String(key string) (string, error)
- func (p Params) Uint(key string) (uint64, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrParamNotExists = errors.New("不存在该参数")
ErrParamNotExists 表示地址参数中并不存在该名称的值
Functions ¶
Types ¶
type Params ¶
Params 获取和转换路由中的参数信息
Click to show internal directories.
Click to hide internal directories.