kv

package
v0.20.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal(a, b KeyValue) bool

Equal returns true iff a == b. If a or b implements Equatable, that is used to perform the test.

func KeyEqual

func KeyEqual(a, b KeyValue) bool

func KeyValueEqual

func KeyValueEqual(a, b KeyValue) bool

Types

type Equatable

type Equatable interface {
	Equal(KeyValue) bool
}

Equatable represents a type that can be compared for equality with another value.

type Key

type Key interface {
	Equatable
	hash.Hashable
}

Key represents a type that can be used as a key in a Map or a Set.

type KeyValue

type KeyValue struct {
	Key, Value interface{}
}

KeyValue represents a key-value pair for insertion into a Map.

func KV

func KV(key, val interface{}) KeyValue

KV creates a KeyValue.

func (KeyValue) Format

func (kv KeyValue) Format(f fmt.State, verb rune)

String returns a string representation of a KeyValue.

func (KeyValue) Hash

func (kv KeyValue) Hash(seed uintptr) uintptr

Hash computes a hash for a KeyValue.

func (KeyValue) String

func (kv KeyValue) String() string

String returns a string representation of a KeyValue.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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