umap

package
v0.0.1-beta Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(m map[string]interface{}) map[string]interface{}

Make copy of an existing map

func Decode

func Decode(data []byte, m *map[string]interface{}) error

Decode the byte array into a map

func Encode

func Encode(v map[string]interface{}) ([]byte, error)

Convert the provided map into bytes.

MessagePack encoding is used due to its efficient use of space

func Keys

func Keys(m map[string]interface{}, sorted bool, includeSubKeys bool) []string

Get all the keys inside a map

func Lookup

func Lookup(provided map[string]interface{}, k string, toNearestParent bool) (map[string]interface{}, interface{}, string)

Finds a field inside the map, provided that the key k is formatted as following:

  • For a first-level key: "key"
  • For a key inside nested maps: "key.key1.key2"

func Unmarshal

func Unmarshal(m map[string]interface{}, to interface{}) error

Unpack the map into a struct

Types

This section is empty.

Jump to

Keyboard shortcuts

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