golang解析yaml配置文件踩坑
golang解析yaml配置文件踩坑1.go在写struct的时候遇到重名的yaml配置,在struct中指定名称type Discovery struct{ Locator Locator `yaml:"locator,omitempty"`}type Locator struct { Enabled bool `yaml:"enabled,omitempty"`}type Gateway struct{ Routes []Routes `yaml:"routes,omi
原创
2021-04-09 11:32:28 ·
5185 阅读 ·
2 评论