sortedmap

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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