samber/cc-skills-golang · golang-spf13-viper · SKILL.md
Golang配置管理
使用spf13/viper的Golang配置库——支持分层优先级(标志>环境变量>文件>键值>默认值)、BindPFlag/BindPFlags、SetEnvPrefix+SetEnvKeyReplacer+AutomaticEnv、ReadInConfig+ConfigFileNotFoundError、Unmarshal+mapstructure结构标签、Sub子树、WatchConfig+OnConfigChange热重载、viper.New()测试隔离及远程键值集成。适用于使用或采用spf13/viper,或代码库导入`github.com/spf13/viper`时。关于viper的CLI命令结构,参见`samber/cc-skills-golang@golang-spf13-cobra`技能;通用CLI架构参见`samber/cc-skills-golang@golang-cli`。
这是公开 Agent Skill 的中文说明,由采集翻译或编辑润色,完整内容以上游 SKILL.md 为准。适用于 Cursor / Claude Code / Codex / Gemini。 打开上游 SKILL.md
安装
通用(npx skills)
npx skills add samber/cc-skills-golang -s golang-spf13-viper
Cursor
把该 Skill 复制到项目的 .cursor/skills/golang-spf13-viper/ 目录
Claude Code
npx skills add samber/cc-skills-golang -a claude-code -s golang-spf13-viper