dotnotation

package
v1.45.1 Latest Latest
Warning

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

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

Documentation

Overview

Package dotnotation implements a dotnotation (hello.world) for accessing fields within a map[string]interface{}

Index

Constants

This section is empty.

Variables

View Source
var ErrKeyNotAMap = errors.New("key is not a map")

ErrKeyNotAMap is returned when an intermediate key is not a map.

View Source
var ErrKeyNotFound = errors.New("key not found")

ErrKeyNotFound is returned when a key is not found in the map.

View Source
var ErrNotAMap = errors.New("data is not a map")

ErrNotAMap is returned when the provided data is not a map.

Functions

func Get

func Get(data any, key string) (any, error)

Get looks up an entry in data by parsing the "key" into deeply nested keys, traversing it by "dots" in the key name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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