fix: getconfig api old format output

This commit is contained in:
langhuihui
2023-12-11 10:00:02 +08:00
parent 8ee68a7ff7
commit 7311bf4d66
2 changed files with 19 additions and 13 deletions
+2 -2
View File
@@ -94,10 +94,10 @@ func (config Config) Has(key string) (ok bool) {
}
func (config *Config) MarshalJSON() ([]byte, error) {
if config.props == nil {
if config.propsMap == nil {
return json.Marshal(config.Value)
}
return json.Marshal(config.props)
return json.Marshal(config.propsMap)
}
// Parse 第一步读取配置结构体的默认值