Documentation ¶
Index ¶
- func Bool(i interface{}, def ...bool) bool
- func Byte(i interface{}) byte
- func Bytes(i interface{}) []byte
- func Convert(i interface{}, t string, params ...interface{}) interface{}
- func Duration(i interface{}) time.Duration
- func Float(i interface{}, def ...float32) float32
- func Float32(i interface{}, def ...float32) float32
- func Float64(i interface{}, def ...float64) float64
- func Floats(i interface{}) []float64
- func Int(i interface{}, def ...int) int
- func Int16(i interface{}, def ...int16) int16
- func Int32(i interface{}, def ...int32) int32
- func Int64(v interface{}, def ...int64) int64
- func Int8(i interface{}, def ...int8) int8
- func Interfaces(i interface{}) []interface{}
- func Ints(i interface{}) []int
- func Map(value interface{}, tags ...string) map[string]interface{}
- func MapDeep(value interface{}, tags ...string) map[string]interface{}
- func Maps(value interface{}, tags ...string) []map[string]interface{}
- func MapsDeep(value interface{}, tags ...string) []map[string]interface{}
- func Rune(i interface{}) rune
- func Runes(i interface{}) []rune
- func SliceAny(i interface{}) []interface{}
- func SliceFloat(i interface{}) []float64
- func SliceInt(i interface{}) []int
- func SliceMap(i interface{}) []map[string]interface{}
- func SliceMapDeep(i interface{}) []map[string]interface{}
- func SliceStr(i interface{}) []string
- func SliceStruct(params interface{}, pointer interface{}, mapping ...map[string]string) (err error)
- func SliceStructDeep(params interface{}, pointer interface{}, mapping ...map[string]string) (err error)
- func String(v interface{}, def ...string) string
- func Strings(i interface{}) []string
- func Struct(params interface{}, pointer interface{}, mapping ...map[string]string) error
- func StructDeep(params interface{}, pointer interface{}, mapping ...map[string]string) error
- func Structs(params interface{}, pointer interface{}, mapping ...map[string]string) (err error)
- func StructsDeep(params interface{}, pointer interface{}, mapping ...map[string]string) (err error)
- func Time(i interface{}, format ...string) time.Time
- func Uint(i interface{}, def ...uint) uint
- func Uint16(i interface{}, def ...uint16) uint16
- func Uint32(i interface{}, def ...uint32) uint32
- func Uint64(i interface{}, def ...uint64) uint64
- func Uint8(i interface{}, def ...uint8) uint8
- func XTime(i interface{}, format ...string) *xtime.Time
- type IString
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Convert ¶
func Convert(i interface{}, t string, params ...interface{}) interface{}
Convert converts the variable <i> to the type <t>, the type <t> is specified by string. The unnecessary parameter <params> is used for additional parameter passing.
func Interfaces ¶
func Interfaces(i interface{}) []interface{}
Interfaces converts <i> to []interface{}.
func SliceMapDeep ¶
func SliceMapDeep(i interface{}) []map[string]interface{}
SliceMapDeep is alias of MapsDeep.
func SliceStruct ¶
SliceStruct is alias of Structs.
func SliceStructDeep ¶
func SliceStructDeep(params interface{}, pointer interface{}, mapping ...map[string]string) (err error)
SliceStructDeep is alias of StructsDeep.
func StructDeep ¶
使用字典map设置struct字段值包括内嵌struct params 设置struct字段值的数据字典, 字段名不区分大小写 mapping 字典键名key与struct字段名映射关系
func StructsDeep ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.