{"skill":{"slug":"golang-spf13-viper","displayName":"Golang Spf13 Viper","summary":"Golang configuration library using spf13/viper — layered precedence (flag > env > file > KV > default), BindPFlag/BindPFlags, SetEnvPrefix + SetEnvKeyReplace...","tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":26,"installsAllTime":0,"installsCurrent":0,"stars":0,"versions":1},"createdAt":1777649383403,"updatedAt":1777649809718},"latestVersion":{"version":"1.0.0","createdAt":1777649383403,"changelog":"Initial release: Introduces a dedicated skill for using spf13/viper to manage configuration in Go with layered precedence and reliable environment/flag integration.\n\n- Describes viper’s fixed precedence: Set > flag > env > file > KV > default.\n- Explains proper flag binding (BindPFlag/BindPFlags) and integration best practices with CLI tools.\n- Details environment variable binding with SetEnvPrefix, SetEnvKeyReplacer, and AutomaticEnv to avoid common pitfalls.\n- Documents config file loading, error handling, Unmarshal with mapstructure tags, and effective struct mapping.\n- Covers use of Sub-trees, hot reload with WatchConfig/OnConfigChange, and per-test isolation via viper.New().\n- Provides practical advice, common mistakes, and references for in-depth scenarios.","license":"MIT-0"},"metadata":{"os":null,"systems":null},"owner":{"handle":"samber","userId":"s173arkhs3131fq5jf769qq75583hdgt","displayName":"Samuel Berthe","image":"https://avatars.githubusercontent.com/u/2951285?v=4"},"moderation":null}