介绍一个我当初在鹅厂写过的吧。
完全的云原生环境下的配置管理。
结合 直接上代码给你看看吧。
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…。
刘强东看到了什么,才去搞外卖?
刘强东看到了什么,才去搞外卖?...(144 )人阅读时间:2025-06-26 15:35:13
央行行长潘功胜首次在公开场合谈及稳定币,稳定币是什么?有何深意?
央行行长潘功胜首次在公开场合谈及稳定币,稳定币是什么?有何深意?...(144 )人阅读时间:2025-06-26 15:55:14
为什么很少看到su7***第一视角的记录?
为什么很少看到su7***第一视角的记录?...(144 )人阅读时间:2025-06-26 14:25:14
为什么日本人室内光脚啊?他们屋子里有这么干净吗?
为什么日本人室内光脚啊?他们屋子里有这么干净吗?...(144 )人阅读时间:2025-06-26 14:55:13