improve formatting of invalid label value error messages

This commit is contained in:
Marco Jantke 2017-08-20 00:54:11 +02:00
parent 555018f3c9
commit 6df742e132
1 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ func validateLabelValues(vals []string, expectedNumberOfValues int) error {
for _, val := range vals {
if !utf8.ValidString(val) {
return errors.New(fmt.Sprintf("label %q is not valid utf8", val))
return errors.New(fmt.Sprintf("label value %#v is not valid utf8", val))
}
}
@ -27,7 +27,7 @@ func validateLabels(labels Labels, expectedNumberOfValues int) error {
for name, val := range labels {
if !utf8.ValidString(val) {
return errors.New(fmt.Sprintf("label %s: %q is not valid utf8", name, val))
return errors.New(fmt.Sprintf("label %s: %#v is not valid utf8", name, val))
}
}