mirror of
https://gitee.com/johng/gf
synced 2026-06-06 02:25:47 +08:00
fix(contrib/config/polaris): it only supports json format for configuration contents, add more content formats support (#4126)
This commit is contained in:
@ -147,7 +147,7 @@ func (c *Client) doUpdate(ctx context.Context) (err error) {
|
||||
return gerror.New("config file is empty")
|
||||
}
|
||||
var j *gjson.Json
|
||||
if j, err = gjson.DecodeToJson([]byte(c.client.GetContent())); err != nil {
|
||||
if j, err = gjson.LoadContent([]byte(c.client.GetContent())); err != nil {
|
||||
return gerror.Wrap(err, `parse config map item from polaris failed`)
|
||||
}
|
||||
c.value.Set(j)
|
||||
|
||||
Reference in New Issue
Block a user