Documentation ¶
Index ¶
- type Map
- func (m *Map) Delete(key string) (interface{}, bool)
- func (m *Map) Get(key string) (interface{}, bool)
- func (m *Map) GetPos(pos uint64) (key string, value interface{}, ok bool)
- func (m *Map) Len() int
- func (m *Map) Range(iter func(key string, value interface{}) bool)
- func (m *Map) Set(key string, value interface{}) (interface{}, bool)
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 is a hashmap. Like map[string]interface{}
func (*Map) Delete ¶
Delete deletes a value for a key. Returns the deleted value, or false when no value was assigned.
func (*Map) Get ¶
Get returns a value for a key. Returns false when no value has been assign for key.
func (*Map) GetPos ¶ added in v1.1.0
GetPos gets a single keys/value nearby a position The pos param can be any valid uint64. Useful for grabbing a random item from the map. It's not safe to call or Set or Delete while ranging.
Click to show internal directories.
Click to hide internal directories.