mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-03 23:20:26 +08:00
21 lines
364 B
Go
21 lines
364 B
Go
package models
|
|
|
|
import "encoding/json"
|
|
|
|
// DecodeNodes 解析已完成节点信息
|
|
func (this *HTTPCacheTaskKey) DecodeNodes() map[string]bool {
|
|
var result = map[string]bool{}
|
|
var nodesJSON = this.Nodes
|
|
if IsNull(nodesJSON) {
|
|
return result
|
|
}
|
|
|
|
err := json.Unmarshal(nodesJSON, &result)
|
|
if err != nil {
|
|
// ignore error
|
|
return result
|
|
}
|
|
|
|
return result
|
|
}
|