Building a CLI with go-tool-base, part 2: configuration your tool can trust
Configuration for a Go CLI: precedence of flags over env over files, per-command embedded defaults, layered config merging and a strict mode.

Configuration for a Go CLI: precedence of flags over env over files, per-command embedded defaults, layered config merging and a strict mode.

Hot-reloading configuration: watch the file, re-read it, swap it in atomically and notify observers, without restarting a long-running service.

Config loaders ignore keys they do not recognise, so a typo runs on the old value. Deriving a validation schema from struct tags to catch it.
