commons-go/sensorconfig/model/Keys.go
crusader 2eb0a778e0 ing
2018-04-20 11:37:07 +09:00

18 lines
266 B
Go

package model
type Keys struct {
Metric string `json:"metric,omitempty"`
Key string `json:"key,omitempty"`
}
func KeysToMap(keys []Keys) map[string]string {
m := make(map[string]string)
for _, key := range keys {
m[key.Key] = key.Metric
}
return m
}