maps

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MaxDepth = 32
)

Functions

func MergeStringInterfaceMap

func MergeStringInterfaceMap(dst, src map[string]interface{}) map[string]interface{}

Merge recursively merges the src and dst maps. Key conflicts are resolved by preferring src, or recursively descending, if both src and dst are maps.

Types

type InterfaceInterfaceCOWMap

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

InterfaceInterfaceCOWMap is a synchronous copy on write map. Reads are cheap. Writes are expensive.

func NewInterfaceInterfaceCOWMap

func NewInterfaceInterfaceCOWMap() *InterfaceInterfaceCOWMap

NewInterfaceInterfaceCOWMap initializes a new empty map. Use of nil to empty the InterfaceInterfaceCOWMap is okay.

func (*InterfaceInterfaceCOWMap) Clear

func (m *InterfaceInterfaceCOWMap) Clear()

Clear removes all keys from the InterfaceInterfaceCOWMap.

func (*InterfaceInterfaceCOWMap) Clone

func (m *InterfaceInterfaceCOWMap) Clone() map[interface{}]interface{}

Clone returns a shallow clone of map

func (*InterfaceInterfaceCOWMap) CopyFrom

func (m *InterfaceInterfaceCOWMap) CopyFrom(src map[interface{}]interface{})

CopyFrom efficiently inserts all the key-value pairs.

func (*InterfaceInterfaceCOWMap) Get

func (m *InterfaceInterfaceCOWMap) Get(key interface{}) interface{}

Get retrieves the value associated with the key.

func (*InterfaceInterfaceCOWMap) IsEmpty

func (m *InterfaceInterfaceCOWMap) IsEmpty() bool

IsEmpty returns true if map is empty

func (*InterfaceInterfaceCOWMap) Keys

func (m *InterfaceInterfaceCOWMap) Keys() []interface{}

Keys returns all keys

func (*InterfaceInterfaceCOWMap) Load

func (m *InterfaceInterfaceCOWMap) Load(key interface{}) (value interface{}, ok bool)

Load retrieves the value associated with the key.

func (*InterfaceInterfaceCOWMap) Remove

func (m *InterfaceInterfaceCOWMap) Remove(key interface{})

Remove removes key from the InterfaceInterfaceCOWMap.

func (*InterfaceInterfaceCOWMap) Set

func (m *InterfaceInterfaceCOWMap) Set(key interface{}, value interface{})

Set inserts a key-value pair.

func (*InterfaceInterfaceCOWMap) SetIfNotPresent

func (m *InterfaceInterfaceCOWMap) SetIfNotPresent(key interface{}, value interface{})

SetIfNotPresent inserts a key-value pair if not exists.

func (*InterfaceInterfaceCOWMap) Size

func (m *InterfaceInterfaceCOWMap) Size() int

Size returns map size

func (*InterfaceInterfaceCOWMap) Values

func (m *InterfaceInterfaceCOWMap) Values() []interface{}

Values returns all values

type InterfaceInterfaceMap

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

InterfaceInterfaceMap is a synchronous map.

func NewInterfaceInterfaceMap

func NewInterfaceInterfaceMap() *InterfaceInterfaceMap

NewInterfaceInterfaceMap initializes a new empty map. Use of nil to empty the InterfaceInterfaceMap is okay.

func (*InterfaceInterfaceMap) Clear

func (m *InterfaceInterfaceMap) Clear()

Clear removes all keys from the InterfaceInterfaceMap.

func (*InterfaceInterfaceMap) Clone

func (m *InterfaceInterfaceMap) Clone() map[interface{}]interface{}

Clone returns a shallow clone of map

func (*InterfaceInterfaceMap) CopyFrom

func (m *InterfaceInterfaceMap) CopyFrom(src map[interface{}]interface{})

CopyFrom efficiently inserts all the key-value pairs.

func (*InterfaceInterfaceMap) Get

func (m *InterfaceInterfaceMap) Get(key interface{}) interface{}

Get retrieves the value associated with the key.

func (*InterfaceInterfaceMap) IsEmpty

func (m *InterfaceInterfaceMap) IsEmpty() bool

IsEmpty returns true if map is empty

func (*InterfaceInterfaceMap) Keys

func (m *InterfaceInterfaceMap) Keys() []interface{}

Keys returns all keys

func (*InterfaceInterfaceMap) Load

func (m *InterfaceInterfaceMap) Load(key interface{}) (value interface{}, ok bool)

Load retrieves the value associated with the key.

func (*InterfaceInterfaceMap) Remove

func (m *InterfaceInterfaceMap) Remove(key interface{})

Remove removes key from the InterfaceInterfaceMap.

func (*InterfaceInterfaceMap) Set

func (m *InterfaceInterfaceMap) Set(key interface{}, value interface{})

Set inserts a key-value pair.

func (*InterfaceInterfaceMap) SetIfNotPresent

func (m *InterfaceInterfaceMap) SetIfNotPresent(key interface{}, value interface{})

SetIfNotPresent inserts a key-value pair if not exists.

func (*InterfaceInterfaceMap) Size

func (m *InterfaceInterfaceMap) Size() int

Size returns map size

func (*InterfaceInterfaceMap) Values

func (m *InterfaceInterfaceMap) Values() []interface{}

Values returns all values

type StringInterfaceCOWMap

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

StringInterfaceCOWMap is a synchronous copy on write map. Reads are cheap. Writes are expensive.

func NewStringInterfaceCOWMap

func NewStringInterfaceCOWMap() *StringInterfaceCOWMap

NewStringInterfaceCOWMap initializes a new empty map. Use of nil to empty the StringInterfaceCOWMap is okay.

func (*StringInterfaceCOWMap) Clear

func (m *StringInterfaceCOWMap) Clear()

Clear removes all keys from the StringInterfaceCOWMap.

func (*StringInterfaceCOWMap) Clone

func (m *StringInterfaceCOWMap) Clone() map[string]interface{}

Clone returns a shallow clone of map

func (*StringInterfaceCOWMap) CopyFrom

func (m *StringInterfaceCOWMap) CopyFrom(src map[string]interface{})

CopyFrom efficiently inserts all the key-value pairs.

func (*StringInterfaceCOWMap) Get

func (m *StringInterfaceCOWMap) Get(key string) interface{}

Get retrieves the value associated with the key.

func (*StringInterfaceCOWMap) IsEmpty

func (m *StringInterfaceCOWMap) IsEmpty() bool

IsEmpty returns true if map is empty

func (*StringInterfaceCOWMap) Keys

func (m *StringInterfaceCOWMap) Keys() []string

Keys returns all keys

func (*StringInterfaceCOWMap) Load

func (m *StringInterfaceCOWMap) Load(key string) (value interface{}, ok bool)

Load retrieves the value associated with the key.

func (*StringInterfaceCOWMap) Remove

func (m *StringInterfaceCOWMap) Remove(key string)

Remove removes key from the StringInterfaceCOWMap.

func (*StringInterfaceCOWMap) Set

func (m *StringInterfaceCOWMap) Set(key string, value interface{})

Set inserts a key-value pair.

func (*StringInterfaceCOWMap) SetIfNotPresent

func (m *StringInterfaceCOWMap) SetIfNotPresent(key string, value interface{})

SetIfNotPresent inserts a key-value pair if not exists.

func (*StringInterfaceCOWMap) Size

func (m *StringInterfaceCOWMap) Size() int

Size returns map size

func (*StringInterfaceCOWMap) Values

func (m *StringInterfaceCOWMap) Values() []interface{}

Values returns all values

type StringInterfaceMap

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

StringInterfaceMap is a synchronous map.

func NewStringInterfaceMap

func NewStringInterfaceMap() *StringInterfaceMap

NewStringInterfaceMap initializes a new empty map. Use of nil to empty the StringInterfaceMap is okay.

func (*StringInterfaceMap) Clear

func (m *StringInterfaceMap) Clear()

Clear removes all keys from the StringInterfaceMap.

func (*StringInterfaceMap) Clone

func (m *StringInterfaceMap) Clone() map[string]interface{}

Clone returns a shallow clone of map

func (*StringInterfaceMap) CopyFrom

func (m *StringInterfaceMap) CopyFrom(src map[string]interface{})

CopyFrom efficiently inserts all the key-value pairs.

func (*StringInterfaceMap) Get

func (m *StringInterfaceMap) Get(key string) interface{}

Get retrieves the value associated with the key.

func (*StringInterfaceMap) IsEmpty

func (m *StringInterfaceMap) IsEmpty() bool

IsEmpty returns true if map is empty

func (*StringInterfaceMap) Load

func (m *StringInterfaceMap) Load(key string) (value interface{}, ok bool)

Load retrieves the value associated with the key.

func (*StringInterfaceMap) Remove

func (m *StringInterfaceMap) Remove(key string)

Remove removes key from the StringInterfaceMap.

func (*StringInterfaceMap) Set

func (m *StringInterfaceMap) Set(key string, value interface{})

Set inserts a key-value pair.

func (*StringInterfaceMap) SetIfNotPresent

func (m *StringInterfaceMap) SetIfNotPresent(key string, value interface{})

SetIfNotPresent inserts a key-value pair if not exists.

func (*StringInterfaceMap) Size

func (m *StringInterfaceMap) Size() int

Size returns map size

func (*StringInterfaceMap) Values

func (m *StringInterfaceMap) Values() []interface{}

Values returns all values

Jump to

Keyboard shortcuts

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