Documentation ¶
Index ¶
- Variables
- func DeepSearchInMap(m map[string]interface{}, paths ...string) map[string]interface{}
- func InsensitiviseMap(m map[string]interface{})
- func MergeStringMap(dest, src map[string]interface{})
- func ToMapStringInterface(src map[interface{}]interface{}) map[string]interface{}
- type FlatMap
- func (flat *FlatMap) Get(key string) interface{}
- func (flat *FlatMap) GetBool(key string) bool
- func (flat *FlatMap) GetDuration(key string) time.Duration
- func (flat *FlatMap) GetFloat64(key string) float64
- func (flat *FlatMap) GetInt(key string) int
- func (flat *FlatMap) GetInt64(key string) int64
- func (flat *FlatMap) GetSlice(key string) []interface{}
- func (flat *FlatMap) GetSliceStringMap(key string) []map[string]interface{}
- func (flat *FlatMap) GetString(key string) string
- func (flat *FlatMap) GetStringMap(key string) map[string]interface{}
- func (flat *FlatMap) GetStringMapString(key string) map[string]string
- func (flat *FlatMap) GetStringMapStringSlice(key string) map[string][]string
- func (flat *FlatMap) GetStringSlice(key string) []string
- func (flat *FlatMap) GetTime(key string) time.Time
- func (flat *FlatMap) Load(content []byte, unmarshal Unmarshaller) error
- func (flat *FlatMap) Reset()
- func (flat *FlatMap) Set(key string, val interface{}) error
- func (flat *FlatMap) UnmarshalKey(key string, rawVal interface{}, tagName string) error
- type Unmarshaller
Constants ¶
This section is empty.
Variables ¶
var KeySpliter = "."
KeySpliter
Functions ¶
func DeepSearchInMap ¶
DeepSearchInMap @Description: 在map里深层搜索 @param m @param paths @return map[string]interface{}
func InsensitiviseMap ¶
func InsensitiviseMap(m map[string]interface{})
InsensitiviseMap @Description:insensitivise map @param m
func MergeStringMap ¶
func MergeStringMap(dest, src map[string]interface{})
MergeStringMap @Description: 合并2个map @param dest @param src
func ToMapStringInterface ¶
func ToMapStringInterface(src map[interface{}]interface{}) map[string]interface{}
ToMapStringInterface @Description:将map[interface{}]interface{}转换为map[string]interface{} @param src @return map[string]interface{}
Types ¶
type FlatMap ¶
type FlatMap struct {
// contains filtered or unexported fields
}
FlatMap @Description:
func (*FlatMap) GetDuration ¶
GetDuration @Description: 以time.Duration形式返回键的值 @receiver flat @param key @return time.Duration
func (*FlatMap) GetFloat64 ¶
GetFloat64 @Description: 以float64形式返回键的值 @receiver flat @param key @return float64
func (*FlatMap) GetInt64 ¶
GetInt64 @Description: 以int64形式返回键的值 @receiver flat @param key @return int64
func (*FlatMap) GetSlice ¶
GetSlice @Description: 以[]interface{}形式返回键的值 @receiver flat @param key @return []interface{}
func (*FlatMap) GetSliceStringMap ¶
GetSliceStringMap @Description: 以[]map[string]interface{}形式返回键的值 @receiver flat @param key @return []map[string]interface{}
func (*FlatMap) GetString ¶
GetString @Description: 以string形式返回键的值 @receiver flat @param key @return string
func (*FlatMap) GetStringMap ¶
GetStringMap @Description: 以map[string]interface{}形式返回键的值 @receiver flat @param key @return map[string]interface{}
func (*FlatMap) GetStringMapString ¶
GetStringMapString @Description: 以map[string]string形式返回键的值 @receiver flat @param key @return map[string]string
func (*FlatMap) GetStringMapStringSlice ¶
GetStringMapStringSlice @Description:以map[string][]string形式返回键的值 @receiver flat @param key @return map[string][]string
func (*FlatMap) GetStringSlice ¶
GetStringSlice @Description: 以[]string形式返回键的值 @receiver flat @param key @return []string
func (*FlatMap) GetTime ¶
GetTime @Description: 以time.Time形式返回键的值 @receiver flat @param key @return time.Time
func (*FlatMap) Load ¶
func (flat *FlatMap) Load(content []byte, unmarshal Unmarshaller) error
Load @Description: @receiver flat @param content @param unmarshal @return error