Documentation
¶
Overview ¶
Package utils provides generic file-IO helpers shared by every sub-config in package config. They are deliberately domain-agnostic - anything that knows about a specific config type belongs in package config itself.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadYAML ¶
LoadYAML reads path. If the file does not exist, defaults() is returned so callers can treat absence as "use defaults" without special-casing. The file body is run through os.ExpandEnv so ${VAR} references resolve from the environment before unmarshalling - any future content that needs a literal `${…}` token must escape it as `$$…`.
label scopes error messages, e.g. "channels" produces "failed to read channels config: …".
func LoadYAMLMerged ¶ added in v0.178.0
LoadYAMLMerged is LoadYAML except the file is decoded OVER the defaults, so keys absent from an existing file keep their default value instead of the zero value. Use it for configs where new fields must not silently load as false/0 for users whose file was seeded before the field existed (e.g. a computer-use tool added after their computer_use.yaml was written).
Types ¶
This section is empty.