Documentation ¶
Overview ¶
Package Map defines various functions useful for Map.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry[K HashEqualer, V any] struct { Key K Value V }
Entry represents an entry in an Map.
type Map ¶
type Map[K HashEqualer, V any] struct { // contains filtered or unexported fields }
Map represents a map which preserves the insertion order of keys.
func FromEntries ¶
func FromEntries[K HashEqualer, V any](entries []Entry[K, V]) *Map[K, V]
FromEntries creates an Map and inserts specified entries.
func WithCapacity ¶
func WithCapacity[K HashEqualer, V any](capacity uint) *Map[K, V]
WithCapacity creates an Map with the specified capacity.
func (*Map[K, V]) Delete ¶
Delete deletes the value for the key in m. Delete returns the value for the key and true if the key is found, or zero value of V and false otherwise.
func (*Map[K, V]) EntryAt ¶
EntryAt returns the entry at i in m. EntryAt returns the key, the value, and whether the i was in the range or not.
Click to show internal directories.
Click to hide internal directories.