go/src
Rob Pike 57f4b43078 fmt: require newlines to match when scanning with a format
The documentation says that newlines behave like this:

Scan etc.: newlines are spaces.
Scanln etc.: newlines terminate the scan.
Scanf etc.: newlines must match in input and format.

The code did not implement this behavior in all cases,
especially for Scanf. Make it behave:

- Fix the handling of spaces and newlines in ss.Advance.
The code is longer but now behaves as it should.

- Delete the reuse of the current ss in newScanState.
There is really no need, since it's only used in recursive
calls to Scan etc., and the flags are likely wrong. Simpler
just to allocate a new one every time, and likelier to
be correct.

Fixes #10862.

Change-Id: If060ac021017346723b0d62de4e5a305da898f68
Reviewed-on: https://go-review.googlesource.com/10991
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-06-12 20:14:14 +00:00
..
archive archive/zip: clarify that CreateHeader takes ownership of FileHeader 2015-06-10 19:56:37 +00:00
bufio
builtin
bytes bytes, strings: add LastIndexByte 2015-04-30 07:13:18 +00:00
cmd cmd/go: fix documentation 2015-06-12 13:23:14 +00:00
compress
container
crypto all: fix misprints in comments 2015-06-11 14:18:57 +00:00
database/sql database/sql: refer correct issue in TestErrBadConnReconnect comment 2015-06-06 02:17:49 +00:00
debug all: fix misprints in comments 2015-06-11 14:18:57 +00:00
encoding encoding/csv: skip blank lines when FieldsPerRecord >= 0 2015-06-12 18:21:12 +00:00
errors
expvar
flag flag: Describe the ErrorHandling enum values. 2015-06-05 13:53:26 +00:00
fmt fmt: require newlines to match when scanning with a format 2015-06-12 20:14:14 +00:00
go go/build: add big endian variant of arm and arm64 to goarch list 2015-06-09 09:56:10 +00:00
hash hash/crc32: move reverse representation docs to an example 2015-05-04 00:19:22 +00:00
html html/template: prevent panic when escaping actions involving chain nodes 2015-06-01 20:52:04 +00:00
image image/gif: allow encoding a single-frame image whose top-left corner 2015-05-06 01:00:58 +00:00
index/suffixarray
internal all: fix misprints in comments 2015-06-11 14:18:57 +00:00
io io: minor improvements to doc comment on WriteString. 2015-05-29 04:33:15 +00:00
log
math all: use RET instead of RETURN on ppc64 2015-06-06 00:07:23 +00:00
mime mime: add mime.types paths for BSDs 2015-06-12 15:51:21 +00:00
net all: fix misprints in comments 2015-06-11 14:18:57 +00:00
os all: fix misprints in comments 2015-06-11 14:18:57 +00:00
path path: fix a typo in documentation of Split 2015-05-31 22:08:38 +00:00
reflect all: use RET instead of RETURN on ppc64 2015-06-06 00:07:23 +00:00
regexp regexp: suggest go doc, not godoc 2015-06-01 20:16:31 +00:00
runtime runtime: wait to update arena_used until after mapping bitmap 2015-06-11 18:15:21 +00:00
sort
strconv strconv: minor internal comment fix 2015-05-27 22:02:02 +00:00
strings strings: mention UTF-8 in the package comment. 2015-06-03 19:28:41 +00:00
sync all: use RET instead of RETURN on ppc64 2015-06-06 00:07:23 +00:00
syscall all: fix misprints in comments 2015-06-11 14:18:57 +00:00
testing testing/quick: probabilistically generate nil pointers 2015-06-08 21:19:13 +00:00
text text/template: refactor code to accomodate bi-state requirement for templates 2015-06-03 20:10:54 +00:00
time time: document that not all Unix time can be represented 2015-05-19 06:19:33 +00:00
unicode
unsafe
Make.dist
all.bash
all.bat
all.rc
androidtest.bash androidtest.bash: clean up stale GOROOT 2015-05-25 20:53:26 +00:00
bootstrap.bash
buildall.bash buildall.bash: exit 1 when make.bash fails 2015-05-17 01:40:33 +00:00
clean.bash
clean.bat
clean.rc
iostest.bash
make.bash
make.bat
make.rc
nacltest.bash nacltest.bash: remove syscall/fstest_nacl.go after test 2015-05-02 02:48:32 +00:00
race.bash cmd/dist: move guts of race.bash into dist 2015-06-09 05:22:37 +00:00
race.bat cmd/dist: move guts of race.bash into dist 2015-06-09 05:22:37 +00:00
run.bash build: correct quoting of args in run.bash 2015-05-09 04:23:47 +00:00
run.bat
run.rc