2017-11-09 09:02:37 +00:00
|
|
|
package util
|
|
|
|
|
2017-12-01 06:04:31 +00:00
|
|
|
import config "git.loafle.net/overflow/overflow_commons_go/modules/config/model"
|
2017-11-09 09:02:37 +00:00
|
|
|
|
2017-12-01 06:04:31 +00:00
|
|
|
func KeysToMap(keys []config.Keys) map[string]string {
|
2017-11-09 09:02:37 +00:00
|
|
|
|
|
|
|
m := make(map[string]string)
|
|
|
|
|
|
|
|
for _, key := range keys {
|
|
|
|
m[key.Key] = key.Metric
|
|
|
|
}
|
|
|
|
|
|
|
|
return m
|
2017-12-01 06:04:31 +00:00
|
|
|
}
|