Documentation
¶
Overview ¶
Package omap provides an ordered map implementation.
Index ¶
- func Init[K comparable, V any](m *Map[K, V], size ...int)
- type Map
- func (m Map[K, V]) All() iter.Seq2[K, V]
- func (m *Map[K, V]) Delete(key K) (val V, has bool)
- func (m Map[K, V]) Get(key K) (val V, has bool)
- func (m Map[K, V]) IsNil() bool
- func (m Map[K, V]) Keys() iter.Seq[K]
- func (m Map[K, V]) Len() int
- func (m Map[K, V]) Map() map[K]V
- func (m Map[K, V]) MarshalJSON() ([]byte, error)
- func (m Map[K, V]) MarshalYAML() (any, error)
- func (m *Map[K, V]) Set(key K, val V)
- func (m Map[K, V]) String() string
- func (m *Map[K, V]) UnmarshalJSON(b []byte) error
- func (m *Map[K, V]) UnmarshalYAML(node *yaml.Node) error
- func (m Map[K, V]) Values() iter.Seq[V]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Map ¶
type Map[K comparable, V any] struct { // contains filtered or unexported fields }
Map is an ordered map.
func (Map[K, V]) MarshalJSON ¶
func (Map[K, V]) MarshalYAML ¶
func (*Map[K, V]) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.