Documentation ¶
Index ¶
- type InsertMap
- func (m InsertMap[K, V]) Copy() InsertMap[K, V]
- func (m InsertMap[K, V]) Entries() []MapEntry[K, V]
- func (m InsertMap[K, V]) Get(key K) (V, bool)
- func (m InsertMap[K, V]) Has(key K) bool
- func (m InsertMap[K, V]) Keys() []K
- func (m InsertMap[K, V]) Len() int
- func (m *InsertMap[K, V]) Set(key K, value V)
- func (m *InsertMap[K, V]) SetEntries(entries ...MapEntry[K, V])
- func (m *InsertMap[K, V]) SetKey(key K)
- func (m InsertMap[K, V]) Values() []V
- type MapEntry
- type StringMap
- type StringMapEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InsertMap ¶
type InsertMap[K comparable, V any] struct { // contains filtered or unexported fields }
InsertMap is a map that preserves initial insertion order.
func NewInsertMap ¶
func NewInsertMap[K comparable, V any](entries ...MapEntry[K, V]) InsertMap[K, V]
func (*InsertMap[K, V]) SetEntries ¶
type MapEntry ¶
type MapEntry[K comparable, V interface{}] struct { Key K Value V }
type StringMap ¶
type StringMap[T interface{}] map[string]T
func (StringMap[T]) OrderedEntries ¶
func (m StringMap[T]) OrderedEntries() []StringMapEntry[T]
OrderedEntries returns the entries of the map in naturally sorted order by key.
type StringMapEntry ¶
Click to show internal directories.
Click to hide internal directories.