Documentation
¶
Overview ¶
Package env provides utilities for parsing environment variables into nested Go data structures. It includes functions to filter unsafe variables, normalize keys, and construct hierarchical maps from environment variable names using specified separators.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildNestedMap ¶
BuildNestedMap creates a nested map structure from a key with separators.
func IsUnsafeVar ¶
IsUnsafeVar checks if an environment variable should be filtered out.
func ParseVariables ¶
ParseVariables processes a map of environment variables into a nested map structure. It takes the following parameters: - vars: map of environment variable key-value pairs to process - pre: prefix to filter variables by (variables not matching prefix are excluded) - sep: separator used in environment variable names to create nested structure Returns a nested map[string]any containing the processed environment variables.
Types ¶
This section is empty.