ing
This commit is contained in:
parent
2eacff61a0
commit
2eb0a778e0
|
@ -4,3 +4,14 @@ type Keys struct {
|
||||||
Metric string `json:"metric,omitempty"`
|
Metric string `json:"metric,omitempty"`
|
||||||
Key string `json:"key,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
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user