Golang Spf13 Viper

Golang configuration library using spf13/viper — layered precedence (flag > env > file > KV > default), BindPFlag/BindPFlags, SetEnvPrefix + SetEnvKeyReplacer + AutomaticEnv, ReadInConfig + ConfigFileNotFoundError, Unmarshal + mapstructure struct tags, Sub for sub-trees, WatchConfig + OnConfigChange for hot reload, viper.New() for test isolation, and remote KV integration. Apply when using or adopting spf13/viper, or when the codebase imports `github.com/spf13/viper`. For CLI command structure alongside viper, see the `samber/cc-skills-golang@golang-spf13-cobra` skill. For general CLI architecture, see `samber/cc-skills-golang@golang-cli`.

om-scogo 8fa37ff 4 files · 29.9 KB Updated 0 repo stars

File contents

om-scogo/skillsh-scraper/tree/main/data/skills/samber-cc-skills-golang/golang-spf13-viper commit 8fa37ffd9f

Frequently asked questions

npx skillmds add om-scogo/golang-spf13-viper