Skip to content
This repository has been archived by the owner on Oct 17, 2018. It is now read-only.

Commit

Permalink
Properly print rune as string
Browse files Browse the repository at this point in the history
  • Loading branch information
m-sandusky committed Oct 20, 2017
1 parent eab82d2 commit a267321
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rules/validator_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ package rules

import (
"fmt"
"strconv"

"github.com/m3db/m3metrics/metric"
"github.com/m3db/m3metrics/policy"
Expand Down Expand Up @@ -228,7 +229,7 @@ func validateChars(str string, invalidChars map[rune]struct{}) error {
// Validate that given string doesn't contain an invalid character.
for _, char := range str {
if _, exists := invalidChars[char]; exists {
return fmt.Errorf("%s contains invalid character %v", str, char)
return fmt.Errorf("%s contains invalid character %s", str, strconv.QuoteRune(char))
}
}
return nil
Expand Down

0 comments on commit a267321

Please sign in to comment.