Documentation ¶
Index ¶
- type S
- func (a S) Bool() (bool, error)
- func (a S) Bytes() []byte
- func (a S) DefaultBool(defaultVal bool) bool
- func (a S) DefaultFloat32(defaultVal float32) float32
- func (a S) DefaultFloat64(defaultVal float64) float64
- func (a S) DefaultInt(defaultVal int) int
- func (a S) DefaultInt64(defaultVal int64) int64
- func (a S) DefaultUint(defaultVal uint) uint
- func (a S) DefaultUint64(defaultVal uint64) uint64
- func (a S) Float32() (float32, error)
- func (a S) Float64() (float64, error)
- func (a S) Int() (int, error)
- func (a S) Int64() (int64, error)
- func (a S) String() string
- func (a S) ToJSON(v interface{}) error
- func (a S) Uint() (uint, error)
- func (a S) Uint64() (uint64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type S ¶
type S string
S 字符串类型转换
func NewWithByte ¶
func (S) DefaultBool ¶
DefaultBool 转换为bool,如果出现错误则使用默认值
func (S) DefaultFloat32 ¶
DefaultFloat32 转换为float32,如果出现错误则使用默认值
func (S) DefaultFloat64 ¶
DefaultFloat64 转换为float64,如果出现错误则使用默认值
func (S) DefaultInt64 ¶
DefaultInt64 转换为int64,如果出现错误则使用默认值
func (S) DefaultUint ¶
DefaultUint 转换为uint,如果出现错误则使用默认值
func (S) DefaultUint64 ¶
DefaultUint64 转换为uint64,如果出现错误则使用默认值
Click to show internal directories.
Click to hide internal directories.