Skip to content

Commit a5dc546

Browse files
committed
fix(pkg/strvals): use rune literal instead of ASCII
When checking that a value begins with zero use a rune literal instead of the ASCII code for zero.
1 parent 609e72b commit a5dc546

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/strvals/parser.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ func typedVal(v []rune) interface{} {
309309
}
310310

311311
// If this value does not start with zero, try parsing it to an int
312-
if len(val) != 0 && val[0] != 48 {
312+
if len(val) != 0 && val[0] != '0' {
313313
if iv, err := strconv.ParseInt(val, 10, 64); err == nil {
314314
return iv
315315
}

0 commit comments

Comments
 (0)