omap

package
v0.0.0-...-cc8504f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package omap provides an ordered map implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init[K comparable, V any](m *Map[K, V], size ...int)

Types

type Map

type Map[K comparable, V any] struct {
	// contains filtered or unexported fields
}

Map is an ordered map.

func New

func New[K comparable, V any](size ...int) Map[K, V]

func (Map[K, V]) All

func (m Map[K, V]) All() iter.Seq2[K, V]

func (*Map[K, V]) Delete

func (m *Map[K, V]) Delete(key K) (val V, has bool)

func (Map[K, V]) Get

func (m Map[K, V]) Get(key K) (val V, has bool)

func (Map[K, V]) IsNil

func (m Map[K, V]) IsNil() bool

func (Map[K, V]) Keys

func (m Map[K, V]) Keys() iter.Seq[K]

func (Map[K, V]) Len

func (m Map[K, V]) Len() int

func (Map[K, V]) Map

func (m Map[K, V]) Map() map[K]V

func (Map[K, V]) MarshalJSON

func (m Map[K, V]) MarshalJSON() ([]byte, error)

func (Map[K, V]) MarshalYAML

func (m Map[K, V]) MarshalYAML() (any, error)

func (*Map[K, V]) Set

func (m *Map[K, V]) Set(key K, val V)

func (Map[K, V]) String

func (m Map[K, V]) String() string

func (*Map[K, V]) UnmarshalJSON

func (m *Map[K, V]) UnmarshalJSON(b []byte) error

func (*Map[K, V]) UnmarshalYAML

func (m *Map[K, V]) UnmarshalYAML(node *yaml.Node) error

func (Map[K, V]) Values

func (m Map[K, V]) Values() iter.Seq[V]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL