Skip to content

Commit 5d77857

Browse files
committed
text-formatter: use RuneCountInString
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent c0382cd commit 5d77857

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

text_formatter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func (f *TextFormatter) init(entry *Entry) {
107107
}
108108
// Get the max length of the level text
109109
for _, level := range AllLevels {
110-
levelTextLength := utf8.RuneCount([]byte(level.String()))
110+
levelTextLength := utf8.RuneCountInString(level.String())
111111
if levelTextLength > f.levelTextMaxLength {
112112
f.levelTextMaxLength = levelTextLength
113113
}

0 commit comments

Comments
 (0)