diff options
author | Michael Stapelberg <stapelberg@debian.org> | 2014-06-19 09:22:53 +0200 |
---|---|---|
committer | Michael Stapelberg <stapelberg@debian.org> | 2014-06-19 09:22:53 +0200 |
commit | 8a39ee361feb9bf46d728ff1ba4f07ca1d9610b1 (patch) | |
tree | 4449f2036cccf162e8417cc5841a35815b3e7ac5 /src/pkg/bufio/scan.go | |
parent | c8bf49ef8a92e2337b69c14b9b88396efe498600 (diff) | |
download | golang-8a39ee361feb9bf46d728ff1ba4f07ca1d9610b1.tar.gz |
Imported Upstream version 1.3upstream/1.3
Diffstat (limited to 'src/pkg/bufio/scan.go')
-rw-r--r-- | src/pkg/bufio/scan.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pkg/bufio/scan.go b/src/pkg/bufio/scan.go index 423505fbc..715ce071e 100644 --- a/src/pkg/bufio/scan.go +++ b/src/pkg/bufio/scan.go @@ -135,7 +135,7 @@ func (s *Scanner) Scan() bool { } // Must read more data. // First, shift data to beginning of buffer if there's lots of empty space - // or space is neded. + // or space is needed. if s.start > 0 && (s.end == len(s.buf) || s.start > len(s.buf)/2) { copy(s.buf, s.buf[s.start:s.end]) s.end -= s.start @@ -172,7 +172,7 @@ func (s *Scanner) Scan() bool { break } loop++ - if loop > 100 { + if loop > maxConsecutiveEmptyReads { s.setErr(io.ErrNoProgress) break } @@ -306,7 +306,7 @@ func isSpace(r rune) bool { return true } switch r { - case '\u1680', '\u180e', '\u2028', '\u2029', '\u202f', '\u205f', '\u3000': + case '\u1680', '\u2028', '\u2029', '\u202f', '\u205f', '\u3000': return true } return false |