maps

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Insert

func Insert(dst map[string]any, keys []string, value any)

Insert recursively inserts the given value into the dst maps. Key conflicts are resolved by preferring the given value.

func Merge

func Merge(dst, src map[string]any)

Merge recursively merges the src map into the dst map. Key conflicts are resolved by preferring src, or recursively descending, if both values from src and dst are map.

func Sub added in v0.7.0

func Sub(values map[string]any, path string, delimiter string) any

func TransformKeys added in v0.9.0

func TransformKeys(src map[string]interface{}, keyMap func(string) string)

func Unpack added in v1.1.1

func Unpack(value any) (string, any)

Types

type KeyValue added in v1.1.1

type KeyValue struct {
	Key   string
	Value any
}

func Pack added in v1.1.1

func Pack(key string, value any) KeyValue

Jump to

Keyboard shortcuts

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