Documentation
¶
Overview ¶
Package data holds the copy, merge and validation helpers shared by the public package and its internal implementations. Everything here works on plain Go values: scalars, slices and string keyed maps.
Index ¶
- Constants
- func Clone(value any) any
- func CloneMap(in map[string]any) map[string]any
- func CloneStringMap(in map[string]string) map[string]string
- func CloneStrings(in []string) []string
- func EnvKey(name string) string
- func EnvList(env map[string]string) []string
- func Merge(maps ...map[string]any) map[string]any
- func SortStrings(values []string)
- func SortedDataKeys(values map[string]any) []string
- func SortedKeys(values map[string]string) []string
- func Validate(value any, path string) error
Constants ¶
View Source
const IsWindows = runtime.GOOS == "windows"
IsWindows reports the host platform. Windows compares environment names case-insensitively.
View Source
const MaxDepth = 32
MaxDepth bounds nesting while validating caller supplied data.
Variables ¶
This section is empty.
Functions ¶
func CloneStringMap ¶
CloneStringMap copies a string map.
func EnvList ¶
EnvList flattens an environment map into the KEY=VALUE slice os/exec expects, sorted for deterministic results.
func SortedDataKeys ¶
SortedDataKeys returns the keys of a data map in ascending order.
func SortedKeys ¶
SortedKeys returns the keys of a string map in ascending order.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.