Files
EdgeAPI/internal/db/models/metric_stat_model_ext.go

13 lines
219 B
Go
Raw Permalink Normal View History

2021-06-30 19:59:49 +08:00
package models
2021-06-27 21:59:37 +08:00
import "encoding/json"
2021-06-30 19:59:49 +08:00
// DecodeKeys 解析Key
func (this *MetricStat) DecodeKeys() []string {
2021-06-27 21:59:37 +08:00
var result []string
if len(this.Keys) > 0 {
2022-03-22 19:30:30 +08:00
_ = json.Unmarshal(this.Keys, &result)
2021-06-27 21:59:37 +08:00
}
return result
}