介绍一个我当初在鹅厂写过的吧。
完全的云原生环境下的配置管理。
结合 直接上代码给你看看吧。
type MyConf struct { TestKey1 string `cm:"testKey1"` TestKey2 int `cm:"testKey2"` TestKey3 struct { SubKey1 string `yaml:"subKey1"` SubKey2 int `yaml:"subKey2"` SubKey3 []string `yaml:"subKey3"` } `cm:"testKey3"` } func (c *MyConf) CMName() string { return "cm-op-config-test" } 使用? myConf := &My…。
软件开发公司真就赚不到钱了吗?...
亲妈不愿意帮我带孩子,说那是奶奶的责任,不是她这个当外婆的责任,怎么办?...
四川称将借鉴苏超经验办川超,四川有哪些特色可以成为川超的「梗」?川超还能延续苏超热度吗?...
如何评价 Steam 新游《捞女游戏》(已改名《情感反诈模拟器》)?...