Skip to content

Commit 27f1a38

Browse files
committed
Minor cleanup on ParseInt
1 parent 6c8c6a8 commit 27f1a38

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

parser.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,11 +483,11 @@ func ParseFloat(b []byte) (float64, error) {
483483
}
484484
}
485485

486-
// ParseNumber parses a Number ValueType into a Go float64
486+
// ParseInt parses a Number ValueType into a Go int64
487487
func ParseInt(b []byte) (int64, error) {
488-
if v, err := parseInt(b); !err {
488+
if v, ok := parseInt(b); !ok {
489489
return 0, MalformedValueError
490490
} else {
491491
return v, nil
492492
}
493-
}
493+
}

0 commit comments

Comments
 (0)