package
0.0.0-20200518095232-1fa3e640cc5f
Repository: https://github.com/sereiner/library.git
Documentation: pkg.go.dev
# Functions
Decode takes a map and uses reflection to convert it into the given Go native structure.
DecodeInt 判断变量的值与指定相等时设置为另一个值,否则使用原值.
DecodePath takes a map and uses reflection to convert it into the given Go native structure.
DecodeSlicePath decodes a slice of maps against a slice of structures that contain specified tags.
DecodeString 判断变量的值与指定相等时设置为另一个值,否则使用原值.
GetBool 获取bool类型值,表示为true的值有:1, t, T, true, TRUE, True, YES, yes, Yes, Y, y, ON, on, On.
GetDatatime 获取时间.
GetFloat32 获取float32数据,不是有效的数字则返回默然值或0.
GetFloat64 获取float64数据,不是有效的数字则返回默然值或0.
No description provided by the author
GetInt 获取int数据,不是有效的数字则返回默然值或0.
GetInt32 获取int32数据,不是有效的数字则返回默然值或0.
GetInt64 获取int64数据,不是有效的数字则返回默然值或0.
No description provided by the author
GetMax 获取指定参数的最大值.
GetMin 获取指定参数的最小值.
GetString 获取字符串.
No description provided by the author
No description provided by the author
IntContains int数组中是否包含指定值.
IsEmpty 值是否为空.
Map2Struct 将map转换成struct.
MustFloat32 获取float32,不是有效的数字则返回false.
MustFloat64 获取float64,不是有效的数字则返回false.
MustInt 获取int,不是有效的数字则返回false.
MustString 获取字符串,不是字符串格式则返回false.
NewDecoder returns a new decoder for the given configuration.
NewExtendMap 构建包含扩展函数的 map[string]interface{}.
NewPathDecoder returns a new decoder for the given configuration.
ParseBool 将字符串转换为bool值.
Struct2Map 将struct 转换成map[string]interface{}.
No description provided by the author
# Structs
A Decoder takes a raw interface value and turns it into structured data, keeping track of rich error information along the way in case anything goes wrong.
DecoderConfig is the configuration that is used to create a new decoder and allows customization of various aspects of decoding.
Error implements the error interface and can represents multiple errors that occur in the course of a single decode.
Metadata contains information about decoding a structure that is tedious or difficult to get otherwise.
# Interfaces
No description provided by the author
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
XMaps 多行数据.