dict

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dict

type Dict[K comparable, V any] map[K]V

func (*Dict[K, V]) Clear

func (d *Dict[K, V]) Clear() *Dict[K, V]

func (Dict[K, V]) Copy

func (d Dict[K, V]) Copy() Dict[K, V]

func (*Dict[K, V]) Delete

func (d *Dict[K, V]) Delete(key K) bool

func (Dict[K, V]) Empty

func (d Dict[K, V]) Empty() bool

func (Dict[K, V]) Equal

func (d Dict[K, V]) Equal(another Dict[K, V]) bool

func (Dict[K, V]) Get

func (d Dict[K, V]) Get(key K, defaultValue ...V) (value V)

func (Dict[K, V]) Has

func (d Dict[K, V]) Has(key K) bool

func (Dict[K, V]) Items

func (d Dict[K, V]) Items() []*DictItem[K, V]

func (Dict[K, V]) Keys

func (d Dict[K, V]) Keys() []K

func (Dict[K, V]) MarshalJSON

func (d Dict[K, V]) MarshalJSON() ([]byte, error)

func (*Dict[K, V]) Pop

func (d *Dict[K, V]) Pop(key K, args ...V) (value V, err error)

func (*Dict[K, V]) PopItem

func (d *Dict[K, V]) PopItem() (key K, value V, err error)

func (*Dict[K, V]) Set

func (d *Dict[K, V]) Set(key K, value V) *Dict[K, V]

func (Dict[K, V]) Size

func (d Dict[K, V]) Size() int

func (*Dict[K, V]) UnmarshalJSON

func (d *Dict[K, V]) UnmarshalJSON(data []byte) (err error)

func (*Dict[K, V]) Update

func (d *Dict[K, V]) Update(another Dict[K, V]) *Dict[K, V]

func (Dict[K, V]) Values

func (d Dict[K, V]) Values() []V

type DictItem

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

Jump to

Keyboard shortcuts

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