numeric boolean label values

This commit is contained in:
aexel90 2020-12-28 12:16:51 +01:00
parent 0f963c3012
commit b7b33182b7

View file

@ -182,6 +182,11 @@ func getLabelValues(labelNames []string, result map[string]interface{}) ([]strin
labelValues := []string{}
for _, labelname := range labelNames {
labelValue := fmt.Sprintf("%v", result[labelname])
if labelValue == "true" {
labelValue = "1"
} else if labelValue == "false" {
labelValue = "0"
}
if labelname != "Name" {
labelValue = strings.ToLower(labelValue)
}