Documentation ¶
Overview ¶
Package hashmap implements a map backed by a hash table.
Elements are unordered in the map.
Structure is not thread safe.
Index ¶
- type Map
- func (m *Map) Clear()
- func (m *Map) Empty() bool
- func (m *Map) FromJSON(data []byte) error
- func (m *Map) Get(key interface{}) (value interface{}, found bool)
- func (m *Map) Keys() []interface{}
- func (m *Map) MarshalJSON() ([]byte, error)
- func (m *Map) Put(key interface{}, value interface{})
- func (m *Map) Remove(key interface{})
- func (m *Map) Size() int
- func (m *Map) String() string
- func (m *Map) ToJSON() ([]byte, error)
- func (m *Map) UnmarshalJSON(bytes []byte) error
- func (m *Map) Values() []interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
Map holds the elements in go's native map
func (*Map) FromJSON ¶ added in v1.9.0
FromJSON populates the map from the input JSON representation.
func (*Map) Get ¶
Get searches the element in the map by key and returns its value or nil if key is not found in map. Second return parameter is true if key was found, otherwise false.
func (*Map) MarshalJSON ¶ added in v1.15.0
MarshalJSON @implements json.Marshaler
func (*Map) Put ¶
func (m *Map) Put(key interface{}, value interface{})
Put inserts element into the map.
func (*Map) Remove ¶
func (m *Map) Remove(key interface{})
Remove removes the element from the map by key.
func (*Map) UnmarshalJSON ¶ added in v1.15.0
UnmarshalJSON @implements json.Unmarshaler
Click to show internal directories.
Click to hide internal directories.