orderedmap

package
v0.49.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package orderedmap provides a map implementation where the order of keys is maintained (unlike the native Go map).

This flavor of map is crucial in keeping the output of ytt deterministic and stable.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conversion

type Conversion struct {
	Object interface{}
}

func (Conversion) AsUnorderedStringMaps

func (c Conversion) AsUnorderedStringMaps() interface{}

func (Conversion) FromUnorderedMaps

func (c Conversion) FromUnorderedMaps() interface{}

type Map

type Map struct {
	// contains filtered or unexported fields
}

func NewMap

func NewMap() *Map

func NewMapWithItems

func NewMapWithItems(items []MapItem) *Map

func (*Map) Delete

func (m *Map) Delete(key interface{}) bool

func (*Map) Get

func (m *Map) Get(key interface{}) (interface{}, bool)

func (*Map) Iterate

func (m *Map) Iterate(iterFunc func(k, v interface{}))

func (*Map) IterateErr

func (m *Map) IterateErr(iterFunc func(k, v interface{}) error) error

func (*Map) Keys added in v0.48.0

func (m *Map) Keys() (keys []interface{})

func (*Map) Len

func (m *Map) Len() int

func (*Map) MarshalJSON

func (*Map) MarshalJSON() ([]byte, error)

func (*Map) MarshalYAML

func (*Map) MarshalYAML() (interface{}, error)

func (*Map) Set

func (m *Map) Set(key, value interface{})

type MapItem

type MapItem struct {
	Key   interface{}
	Value interface{}
}

Jump to

Keyboard shortcuts

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