介绍一个我当初在鹅厂写过的吧。
完全的云原生环境下的配置管理。
结合 直接上代码给你看看吧。
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…。
你为什么放弃了wsl?
Office 中为何还要保留 Access 数据库?
如何评价鸿蒙电脑无法编写其自身运行的程序?
海贼王为什么现在被全网黑?
空调现在抽真空15分钟真的还有意义吗?
如何看待黄奇帆称「中国房地产消费的居民负债占家庭收入比重达 137.9% ,需调整抑制消费政策」?