xmap

package
v0.10.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2023 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KeySpliter = "."

KeySpliter ...

Functions

func DeepSearchInMap

func DeepSearchInMap(m map[string]interface{}, paths ...string) map[string]interface{}

DeepSearchInMap deep search in map

func InsensitiviseMap

func InsensitiviseMap(m map[string]interface{})

InsensitiviseMap insensitivise map

func MergeStringMap

func MergeStringMap(dest, src map[string]interface{})

MergeStringMap merge two map

func ToMapStringInterface

func ToMapStringInterface(src map[interface{}]interface{}) map[string]interface{}

ToMapStringInterface cast map[interface{}]interface{} to map[string]interface{}

Types

type FlatMap added in v0.2.0

type FlatMap struct {
	// contains filtered or unexported fields
}

FlatMap ...

func NewFlatMap added in v0.2.0

func NewFlatMap() *FlatMap

NewFlatMap ...

func (*FlatMap) Get added in v0.2.0

func (flat *FlatMap) Get(key string) interface{}

Get returns the value associated with the key

func (*FlatMap) GetBool added in v0.2.0

func (flat *FlatMap) GetBool(key string) bool

GetBool returns the value associated with the key as a boolean.

func (*FlatMap) GetDuration added in v0.2.0

func (flat *FlatMap) GetDuration(key string) time.Duration

GetDuration returns the value associated with the key as a duration.

func (*FlatMap) GetFloat64 added in v0.2.0

func (flat *FlatMap) GetFloat64(key string) float64

GetFloat64 returns the value associated with the key as a float64.

func (*FlatMap) GetInt added in v0.2.0

func (flat *FlatMap) GetInt(key string) int

GetInt returns the value associated with the key as an integer.

func (*FlatMap) GetInt64 added in v0.2.0

func (flat *FlatMap) GetInt64(key string) int64

GetInt64 returns the value associated with the key as an integer.

func (*FlatMap) GetSlice added in v0.2.0

func (flat *FlatMap) GetSlice(key string) []interface{}

GetSlice returns the value associated with the key as a slice of strings.

func (*FlatMap) GetString added in v0.2.0

func (flat *FlatMap) GetString(key string) string

GetString returns the value associated with the key as a string.

func (*FlatMap) GetStringMap added in v0.2.0

func (flat *FlatMap) GetStringMap(key string) map[string]interface{}

GetStringMap returns the value associated with the key as a map of interfaces.

func (*FlatMap) GetStringMapString added in v0.2.0

func (flat *FlatMap) GetStringMapString(key string) map[string]string

GetStringMapString returns the value associated with the key as a map of strings.

func (*FlatMap) GetStringMapStringSlice added in v0.2.0

func (flat *FlatMap) GetStringMapStringSlice(key string) map[string][]string

GetStringMapStringSlice returns the value associated with the key as a map to a slice of strings.

func (*FlatMap) GetStringSlice added in v0.2.0

func (flat *FlatMap) GetStringSlice(key string) []string

GetStringSlice returns the value associated with the key as a slice of strings.

func (*FlatMap) GetTime added in v0.2.0

func (flat *FlatMap) GetTime(key string) time.Time

GetTime returns the value associated with the key as time.

func (*FlatMap) Load added in v0.2.0

func (flat *FlatMap) Load(content []byte, unmarshal Unmarshaller) error

Load ...

func (*FlatMap) Reset added in v0.2.0

func (flat *FlatMap) Reset()

Reset ...

func (*FlatMap) Set added in v0.2.0

func (flat *FlatMap) Set(key string, val interface{}) error

Set ...

func (*FlatMap) UnmarshalKey added in v0.2.0

func (flat *FlatMap) UnmarshalKey(key string, rawVal interface{}, tagName string) error

UnmarshalKey takes a single key and unmarshal it into a Struct.

type Unmarshaller added in v0.2.0

type Unmarshaller = func([]byte, interface{}) error

Unmarshaller ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL