Documentation
¶
Overview ¶
Package mappath provides dotted-path helpers for map[string]any trees. It is the single source of truth for read/write/delete-by-path operations previously duplicated in transform/, provider/env, and providers/consul.
Index ¶
- func Delete(root map[string]any, parts []string)
- func DeleteDotted(root map[string]any, dotted string)
- func Get(root map[string]any, parts ...string) (any, bool)
- func GetDotted(root map[string]any, dotted string) (any, bool)
- func Set(root map[string]any, parts []string, v any)
- func SetDotted(root map[string]any, dotted string, v any)
- func Split(dotted string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteDotted ¶
DeleteDotted is the convenience wrapper for "a.b.c" callers.
func Get ¶
Get returns the value at parts (or root[parts[0]][parts[1]]...) and whether it was found. Intermediate non-map values short-circuit to (nil,false).
func Set ¶
Set writes v at parts, creating intermediate maps as needed. Existing non-map values along the path are silently overwritten by a fresh map (matches the legacy env/consul behavior).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.