sortedmap

package
v0.0.0-...-f9c27df Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidKVExpression = errors.New(`invalid key-value expression`)
	ErrInvalidKVS          = errors.New("the length of kv must be an even number")
)

Functions

This section is empty.

Types

type KV

type KV []any

type SortedMap

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

func New

func New() *SortedMap

func (*SortedMap) Copy

func (m *SortedMap) Copy() *SortedMap

func (*SortedMap) Format

func (m *SortedMap) Format() []string

func (*SortedMap) Get

func (m *SortedMap) Get(key any) (any, bool)

func (*SortedMap) GetOr

func (m *SortedMap) GetOr(key, dft any) any

func (*SortedMap) GetString

func (m *SortedMap) GetString(key any) (string, bool)

func (*SortedMap) GetStringOr

func (m *SortedMap) GetStringOr(key any, dft string) string

func (*SortedMap) HasKey

func (m *SortedMap) HasKey(key any) bool

func (*SortedMap) HasValue

func (m *SortedMap) HasValue(value any) bool

func (*SortedMap) Insert

func (m *SortedMap) Insert(sm *SortedMap)

func (*SortedMap) Keys

func (m *SortedMap) Keys() []any

func (*SortedMap) Range

func (m *SortedMap) Range(iterator func(key, value any))

func (*SortedMap) RangeIf

func (m *SortedMap) RangeIf(iterator func(key, value any) bool)

func (*SortedMap) Remove

func (m *SortedMap) Remove(key any) (value any, ok bool)

func (*SortedMap) Reset

func (m *SortedMap) Reset()

func (*SortedMap) Set

func (m *SortedMap) Set(kv KV) error

func (*SortedMap) SetExpression

func (m *SortedMap) SetExpression(expression string) (key, value any, err error)

func (*SortedMap) SetKV

func (m *SortedMap) SetKV(key, value any)

func (*SortedMap) Values

func (m *SortedMap) Values() []any

Jump to

Keyboard shortcuts

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