numeric boolean label values
This commit is contained in:
parent
0f963c3012
commit
b7b33182b7
1 changed files with 5 additions and 0 deletions
|
@ -182,6 +182,11 @@ func getLabelValues(labelNames []string, result map[string]interface{}) ([]strin
|
||||||
labelValues := []string{}
|
labelValues := []string{}
|
||||||
for _, labelname := range labelNames {
|
for _, labelname := range labelNames {
|
||||||
labelValue := fmt.Sprintf("%v", result[labelname])
|
labelValue := fmt.Sprintf("%v", result[labelname])
|
||||||
|
if labelValue == "true" {
|
||||||
|
labelValue = "1"
|
||||||
|
} else if labelValue == "false" {
|
||||||
|
labelValue = "0"
|
||||||
|
}
|
||||||
if labelname != "Name" {
|
if labelname != "Name" {
|
||||||
labelValue = strings.ToLower(labelValue)
|
labelValue = strings.ToLower(labelValue)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue