Documentation ¶
Index ¶
- func ForEach(m map[string]interface{}, fn ForEachFn)
- func Get(m map[string]interface{}, key string) (interface{}, error)
- func Gets(m map[string]interface{}, keys ...string) (interface{}, error)
- func Merge(a, b map[string]interface{}, strategy Mapper) map[string]interface{}
- func Merger(a Mapper) *merger
- func Set(m map[string]interface{}, key string, value interface{})
- func ToFormatJson(m interface{}) ([]byte, error)
- func ToJson(m interface{}) ([]byte, error)
- func ToKeys(key string) []string
- func ToStruct(m map[string]interface{}, target interface{}) error
- type ForEachFn
- type Mapper
- func (m Mapper) A(key string) ([]interface{}, bool)
- func (m Mapper) Ae(key string) ([]interface{}, error)
- func (m Mapper) Ai(key string) []interface{}
- func (m Mapper) Ao(key string, i []interface{}) []interface{}
- func (m Mapper) B(key string) (bool, bool)
- func (m Mapper) Be(key string) (bool, error)
- func (m Mapper) Bi(key string) bool
- func (m Mapper) Bo(key string, i bool) bool
- func (m Mapper) Copy() Mapper
- func (m Mapper) F(key string) (float64, bool)
- func (m Mapper) Fe(key string) (float64, error)
- func (m Mapper) Fi(key string) float64
- func (m Mapper) Fo(key string, i float64) float64
- func (m Mapper) ForEach(fn ForEachFn)
- func (m Mapper) Get(key string) (interface{}, error)
- func (m Mapper) Gets(keys ...string) (interface{}, error)
- func (m Mapper) Has(key string) bool
- func (m Mapper) I(key string) (int64, bool)
- func (m Mapper) Ie(key string) (int64, error)
- func (m Mapper) Ii(key string) int64
- func (m Mapper) Io(key string, i int64) int64
- func (m Mapper) IsEmpty() bool
- func (m Mapper) Keys() []string
- func (m Mapper) M(key string) (Mapper, bool)
- func (m Mapper) Me(key string) (Mapper, error)
- func (m Mapper) Mi(key string) Mapper
- func (m Mapper) Mo(key string, i Mapper) Mapper
- func (m Mapper) N(key string) (float64, bool)
- func (m Mapper) Ne(key string) (float64, error)
- func (m Mapper) Ni(key string) float64
- func (m Mapper) No(key string, i float64) float64
- func (m Mapper) S(key string) (string, bool)
- func (m Mapper) Se(key string) (string, error)
- func (m Mapper) Set(key string, value interface{}) Mapper
- func (m Mapper) Si(key string) string
- func (m Mapper) Size() int
- func (m Mapper) So(key string, i string) string
- func (m Mapper) String() string
- func (m Mapper) Struct(target interface{}) error
- func (m Mapper) Z(key string) (interface{}, bool)
- func (m Mapper) Ze(key string) (interface{}, error)
- func (m Mapper) Zi(key string) interface{}
- func (m Mapper) Zo(key string, i interface{}) interface{}
- type MergeConfigType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Merge ¶
Merge will merge 'a' and 'b'. with optional strategy mapper a will be modifiy to be the result
func ToFormatJson ¶
Types ¶
type Mapper ¶
type Mapper map[string]interface{}
func Normalize ¶
Normalize will remove key listed in removed. warning: input will be mutation to remove data if you don't want that, copy first.
type MergeConfigType ¶
type MergeConfigType uint8
const ( MERGER_NORMAL MergeConfigType = iota MERGER_OVERRIDE )
Click to show internal directories.
Click to hide internal directories.