Skip to content

Commit

Permalink
解决导出json重复的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
typ431127 committed Sep 24, 2022
1 parent 3542aae commit ff6955f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nacos/nacos.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ func (d *Nacos) GetJson(result_type string) (result interface{}, err error) {
var nacos NacosFile
for _, na := range nacos_server.HealthInstance {
var ta NacosTarget
//ta.Labels = make(map[string]string)
ta.Labels = AddLable
ta.Labels = make(map[string]string)
for key, value := range AddLable {
ta.Labels[key] = value
}
ta.Targets = append(ta.Targets, na[2])
ta.Labels["namespace"] = na[0]
ta.Labels["service"] = na[1]
Expand Down

0 comments on commit ff6955f

Please sign in to comment.