From f83142d838f231e825c02e0d1c6b0b8ccdeff216 Mon Sep 17 00:00:00 2001 From: KimHyeonwoo Date: Tue, 2 Aug 2022 12:07:48 +0900 Subject: [PATCH] replace statForRetry with stat (review reflected) --- internal/decoder/stream.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/internal/decoder/stream.go b/internal/decoder/stream.go index f1a58099..a383f725 100644 --- a/internal/decoder/stream.go +++ b/internal/decoder/stream.go @@ -280,8 +280,7 @@ func (s *Stream) skipObject(depth int64) error { if char(p, cursor) == nul { s.cursor = cursor if s.read() { - _, cursor, p = s.statForRetry() - cursor++ + _, cursor, p = s.stat() continue } return errors.ErrUnexpectedEndOfJSON("string of object", cursor) @@ -344,8 +343,7 @@ func (s *Stream) skipArray(depth int64) error { if char(p, cursor) == nul { s.cursor = cursor if s.read() { - _, cursor, p = s.statForRetry() - cursor++ + _, cursor, p = s.stat() continue } return errors.ErrUnexpectedEndOfJSON("string of object", cursor) @@ -403,8 +401,7 @@ func (s *Stream) skipValue(depth int64) error { if char(p, cursor) == nul { s.cursor = cursor if s.read() { - _, cursor, p = s.statForRetry() - cursor++ + _, cursor, p = s.stat() continue } return errors.ErrUnexpectedEndOfJSON("value of string", s.totalOffset())