commons-go/model/sensorconfig/Keys.go
crusader 687985e7f2 ing
2018-06-13 20:21:42 +09:00

18 lines
274 B
Go

package sensorconfig
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
}