mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-03 15:00:27 +08:00
18 lines
305 B
Go
18 lines
305 B
Go
package models
|
|
|
|
import "encoding/json"
|
|
|
|
func (this *MetricChart) DecodeIgnoredKeys() []string {
|
|
if len(this.IgnoredKeys) == 0 {
|
|
return []string{}
|
|
}
|
|
|
|
var result = []string{}
|
|
err := json.Unmarshal(this.IgnoredKeys, &result)
|
|
if err != nil {
|
|
// 这里忽略错误
|
|
return result
|
|
}
|
|
return result
|
|
}
|