Files
EdgeAPI/internal/db/models/report_node_model_ext.go
2021-09-05 11:10:18 +08:00

13 lines
237 B
Go

package models
import "encoding/json"
func (this *ReportNode) DecodeAllowIPs() []string {
var result = []string{}
if len(this.AllowIPs) > 0 {
// 忽略错误
_ = json.Unmarshal([]byte(this.AllowIPs), &result)
}
return result
}