orderedmap

package
v0.0.0-...-5e24856 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item[K comparable, V any] struct {
	Key   K
	Value V
}

type Map

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

Map is wrapper for map that keeps it's order when deserializing from JSON Warning: it's highly inneficient and should only be used for configuration file or similar use cases

func (*Map[K, V]) Get

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

func (*Map[K, V]) Items

func (m *Map[K, V]) Items() []Item[K, V]

func (*Map[K, V]) Iter

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

func (*Map[K, V]) Len

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

func (*Map[K, V]) UnmarshalJSON

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

func (*Map[K, V]) UnmarshalYAML

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

UnmarshalYAML implements the yaml.Unmarshaler interface.

Jump to

Keyboard shortcuts

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