Documentation
¶
Index ¶
- func Append[T any](data map[string]T, append map[string]T)
- func BuildKeys[K any](mapData interface{}, keyType K) []K
- func BuildMapByKey(mapList []map[string]interface{}, mapKey string) map[interface{}]interface{}
- func BuildMapByStringKey(mapList []map[string]interface{}, mapKey string) map[string]interface{}
- func BuildSliceByStringKey[V any](mapList []map[string]interface{}, keyName string, valueType V) []V
- func BuildValues[V any](mapData interface{}, valueType V) []V
- func Clear[T any](list map[string]T)
- func Clone[T any](data map[string]T) map[string]T
- func ComputeIfAbsent[T any, E any](data map[string]E, key string, defaultValue T) T
- func DelValue(data map[string]interface{}, keys ...interface{})
- func GetBool(data map[string]interface{}, key string, defaultValue bool) bool
- func GetFloat64(data map[string]interface{}, key string, defaultValue float64) float64
- func GetInt(data map[string]interface{}, key string, defaultValue int) int
- func GetInt64(data map[string]interface{}, key string, defaultValue int64) int64
- func GetKeys[T any](data map[string]T) []string
- func GetMap(data map[string]interface{}, key string, defaultValue map[string]interface{}) map[string]interface{}
- func GetOrDefault(data map[string]interface{}, key string, defaultValue interface{}) interface{}
- func GetSlice(data map[string]interface{}, key string, defaultValue []interface{}) []interface{}
- func GetString(data map[string]interface{}, key string, defaultValue string) string
- func GetValue(data map[string]interface{}, keys ...interface{}) (interface{}, error)
- func Has(data map[string]interface{}, key string) bool
- func HasNull(data map[string]interface{}, keys ...interface{}) bool
- func MergeValue(data map[string]interface{}, dataKey string, src map[string]interface{}, ...)
- func SetDefaultValue(data map[string]interface{}, key string, defaultValue interface{})
- func SetValue(data map[string]interface{}, keys ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildMapByKey ¶ added in v1.0.1
func BuildMapByStringKey ¶ added in v1.0.1
func BuildSliceByStringKey ¶ added in v1.0.2
func BuildValues ¶ added in v1.0.1
func BuildValues[V any](mapData interface{}, valueType V) []V
func ComputeIfAbsent ¶
ComputeIfAbsent 通过反射板,绕过GO编译器的类型检查,注意:T和E的类型,实际上必须相同
func GetFloat64 ¶ added in v1.0.1
func GetOrDefault ¶
GetOrDefault 获得元素,如果不存在,以默认值返回
func MergeValue ¶ added in v1.0.2
func SetDefaultValue ¶ added in v1.0.1
SetDefaultValue 确认是否存在某个元素,如果不存在,以默认值填入
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.