OLD | NEW |
1 // Copyright 2010 The Go Authors. All rights reserved. | 1 // Copyright 2010 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 package fmt | 5 package fmt |
6 | 6 |
7 import ( | 7 import ( |
8 "bytes" | 8 "bytes" |
9 "errors" | 9 "errors" |
10 "io" | 10 "io" |
11 "math" | 11 "math" |
12 "os" | 12 "os" |
13 "reflect" | 13 "reflect" |
14 "strconv" | 14 "strconv" |
15 "strings" | 15 "strings" |
16 "unicode" | 16 "unicode" |
17 » "utf8" | 17 » "unicode/utf8" |
18 ) | 18 ) |
19 | 19 |
20 // runeUnreader is the interface to something that can unread runes. | 20 // runeUnreader is the interface to something that can unread runes. |
21 // If the object provided to Scan does not satisfy this interface, | 21 // If the object provided to Scan does not satisfy this interface, |
22 // a local buffer will be used to back up the input, but its contents | 22 // a local buffer will be used to back up the input, but its contents |
23 // will be lost when Scan returns. | 23 // will be lost when Scan returns. |
24 type runeUnreader interface { | 24 type runeUnreader interface { |
25 UnreadRune() error | 25 UnreadRune() error |
26 } | 26 } |
27 | 27 |
(...skipping 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1105 | 1105 |
1106 s.scanOne(c, field) | 1106 s.scanOne(c, field) |
1107 numProcessed++ | 1107 numProcessed++ |
1108 s.fieldLimit = s.limit | 1108 s.fieldLimit = s.limit |
1109 } | 1109 } |
1110 if numProcessed < len(a) { | 1110 if numProcessed < len(a) { |
1111 s.errorString("too many operands") | 1111 s.errorString("too many operands") |
1112 } | 1112 } |
1113 return | 1113 return |
1114 } | 1114 } |
OLD | NEW |