Documentation
¶
Index ¶
- type Element
- type Key
- type Map
- func (m *Map) Clear()
- func (m *Map) Delete(key string)
- func (m *Map) First() *Element
- func (m *Map) Get(key string) (value any, ok bool)
- func (m *Map) GetElement(key Key) *Element
- func (m *Map) KeyIndex(key string) int
- func (m *Map) Keys() []string
- func (m *Map) Last() *Element
- func (m *Map) Len() int
- func (m *Map) MarshalJSON() ([]byte, error)
- func (m *Map) Merge(other *Map)
- func (m *Map) Push(key Key, value Value)
- func (m *Map) PushFront(key Key, value Value)
- func (m *Map) Set(key Key, value Value)
- func (m *Map) SetFront(key Key, value Value)
- func (m *Map) String() string
- func (m *Map) UnmarshalJSON(data []byte) error
- func (m *Map) Values() []Value
- type Value
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
}
func (*Map) GetElement ¶
O(n) for existing keys, because it uses KeyIndex()
func (*Map) MarshalJSON ¶
func (*Map) Push ¶
Same as Set, but pushes the key to the end O(n) if key exists, as it uses Delete()
func (*Map) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.