From 2a19f9733e0b2d9f98f6276f670450e8fd8c4f59 Mon Sep 17 00:00:00 2001 From: starliu Date: Mon, 20 Jan 2025 13:13:48 +0800 Subject: [PATCH] fix: polaris conf only support json --- contrib/config/polaris/polaris.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/config/polaris/polaris.go b/contrib/config/polaris/polaris.go index 04765d6591a..1f9d6ee0576 100644 --- a/contrib/config/polaris/polaris.go +++ b/contrib/config/polaris/polaris.go @@ -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)