Documentation
¶
Index ¶
- func DecodeByTag(input interface{}, output interface{}, tag string) error
- func DuplicateString(s []string) (result []string)
- func GetValueByTag(obj interface{}, tag string, tagValue string) interface{}
- func Map2SliceE(i interface{}) (ks interface{}, vs interface{}, err error)
- func SetValuesByTag(obj interface{}, tag string, values map[string]interface{})
- func StringSlice2Map(s []string) (res map[string]interface{})
- func Struct2Map(obj interface{}, tag string) map[string]interface{}
- func Struct2MapFilterByKeys(m interface{}, tagName string, keys []string) map[string]interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeByTag ¶ added in v1.0.0
func DuplicateString ¶ added in v0.0.6
DuplicateString 去重
func GetValueByTag ¶ added in v0.0.6
GetValueByTag 获取结构体指针中的指定字段值
func Map2SliceE ¶ added in v0.0.6
func Map2SliceE(i interface{}) (ks interface{}, vs interface{}, err error)
Map2SliceE converts keys and values of map to slice in unspecified order with error.
func SetValuesByTag ¶ added in v0.0.6
func StringSlice2Map ¶ added in v0.0.6
StringSlice2Map 将字符串slice转为map
func Struct2Map ¶ added in v0.0.6
Struct2Map 将结构体转为map,tag指定的字段值
func Struct2MapFilterByKeys ¶ added in v1.0.0
Struct2MapFilterByKeys 将结构体指针转为map,tag指定的字段值, keys指定要转换的字段
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.