summaryrefslogtreecommitdiff
path: root/vendor/github.com/bytedance/sonic/internal/decoder/optdec/helper.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/bytedance/sonic/internal/decoder/optdec/helper.go')
-rw-r--r--vendor/github.com/bytedance/sonic/internal/decoder/optdec/helper.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/vendor/github.com/bytedance/sonic/internal/decoder/optdec/helper.go b/vendor/github.com/bytedance/sonic/internal/decoder/optdec/helper.go
index 7bf8a8f39..61faa6c80 100644
--- a/vendor/github.com/bytedance/sonic/internal/decoder/optdec/helper.go
+++ b/vendor/github.com/bytedance/sonic/internal/decoder/optdec/helper.go
@@ -11,7 +11,7 @@ import (
func SkipNumberFast(json string, start int) (int, bool) {
- // find the number ending, we pasred in native, it alway valid
+ // find the number ending, we parsed in native, it always valid
pos := start
for pos < len(json) && json[pos] != ']' && json[pos] != '}' && json[pos] != ',' {
if json[pos] >= '0' && json[pos] <= '9' || json[pos] == '.' || json[pos] == '-' || json[pos] == '+' || json[pos] == 'e' || json[pos] == 'E' {
@@ -40,7 +40,7 @@ func ValidNumberFast(raw string) bool {
return false
}
- // check trainling chars
+ // check trailing chars
for ret < len(raw) {
return false
}
@@ -49,7 +49,7 @@ func ValidNumberFast(raw string) bool {
}
func SkipOneFast2(json string, pos *int) (int, error) {
- // find the number ending, we pasred in sonic-cpp, it alway valid
+ // find the number ending, we parsed in sonic-cpp, it always valid
start := native.SkipOneFast(&json, pos)
if start < 0 {
return -1, error_syntax(*pos, json, types.ParsingError(-start).Error())
@@ -58,7 +58,7 @@ func SkipOneFast2(json string, pos *int) (int, error) {
}
func SkipOneFast(json string, pos int) (string, error) {
- // find the number ending, we pasred in sonic-cpp, it alway valid
+ // find the number ending, we parsed in sonic-cpp, it always valid
start := native.SkipOneFast(&json, &pos)
if start < 0 {
// TODO: details error code