Documentation
¶
Index ¶
- type Map
- func (m *Map[K, V]) Clear()
- func (l *Map[K, V]) Clone() *Map[K, V]
- func (m *Map[K, V]) ContainsKey(key K) bool
- func (l *Map[K, V]) Delete(key K) (V, bool)
- func (l *Map[K, V]) Entries() iter.Seq2[K, V]
- func (m *Map[K, V]) Get(key K) (V, bool)
- func (l *Map[K, V]) Keys() iter.Seq[K]
- func (m *Map[K, V]) Put(key K, value V) (V, bool)
- func (m *Map[K, V]) Size() int
- func (m *Map[K, V]) String() string
- func (l *Map[K, V]) Values() iter.Seq[V]
- type MapJSON
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Map ¶
type Map[K comparable, V any] struct { // contains filtered or unexported fields }
func (*Map[K, V]) ContainsKey ¶
type MapJSON ¶
func (*MapJSON) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface, so it could be serialized. When serializing, the keys of the map will keep the order they are added.
func (*MapJSON) UnmarshalJSON ¶
type Option ¶
type Option[K comparable, V any] func(*Map[K, V])
func WithCapacity ¶
func WithCapacity[K comparable, V any](capacity int) Option[K, V]
Click to show internal directories.
Click to hide internal directories.