mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-27 10:10:27 +08:00
优化代码
This commit is contained in:
@@ -11,7 +11,7 @@ func (this *NodeIPAddressThreshold) DecodeItems() (result []*nodeconfigs.IPAddre
|
||||
return
|
||||
}
|
||||
|
||||
err := json.Unmarshal([]byte(this.Items), &result)
|
||||
err := json.Unmarshal(this.Items, &result)
|
||||
if err != nil {
|
||||
remotelogs.Error("NodeIPAddressThreshold", "decode items: "+err.Error())
|
||||
}
|
||||
@@ -23,7 +23,7 @@ func (this *NodeIPAddressThreshold) DecodeActions() (result []*nodeconfigs.IPAdd
|
||||
return
|
||||
}
|
||||
|
||||
err := json.Unmarshal([]byte(this.Actions), &result)
|
||||
err := json.Unmarshal(this.Actions, &result)
|
||||
if err != nil {
|
||||
remotelogs.Error("NodeIPAddressThreshold", "decode actions: "+err.Error())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user