介绍一个我当初在鹅厂写过的吧。
完全的云原生环境下的配置管理。
结合 直接上代码给你看看吧。
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…。
为什么有钱人的气质穷人模仿不来?...
如何评价董宇辉:“飞机大炮对你生活影响其实并不大,小家电才是真正提升每个人生活质量”这个观点?...
黄晓明上戏考博落榜,本人回应「明年再战」,怎样看明星对高学历的追求?上戏博士有多难考?...
你手机中最舍不得卸载的APP是什么?...