2013-05-24 14:34:50 -06:00
|
|
|
This file collects notes about what has changed since Go 1.1
|
|
|
|
and should be mentioned in the Go 1.2 release notes.
|
|
|
|
During the Go 1.2 release process it will be necessary to convert
|
|
|
|
it to HTML, similar to go1.1.html, but for now it is a text file,
|
|
|
|
to make the process of keeping it up-to-date more lightweight.
|
|
|
|
|
|
|
|
Please keep the descriptions to a single line, starting with the
|
|
|
|
package or cmd/xxx directory name, and ending in a CL number.
|
|
|
|
Please keep the list sorted (as in sort.Strings of the lines).
|
|
|
|
|
2013-05-29 13:03:52 -06:00
|
|
|
cmd/5a: removed support for R9/R10 (use m/g instead) (CL 9840043).
|
|
|
|
|
fmt.Printf: introduce notation for random access to arguments.
This text is added to doc.go:
Explicit argument indexes:
In Printf, Sprintf, and Fprintf, the default behavior is for each
formatting verb to format successive arguments passed in the call.
However, the notation [n] immediately before the verb indicates that the
nth one-indexed argument is to be formatted instead. The same notation
before a '*' for a width or precision selects the argument index holding
the value. After processing a bracketed expression [n], arguments n+1,
n+2, etc. will be processed unless otherwise directed.
For example,
fmt.Sprintf("%[2]d %[1]d\n", 11, 22)
will yield "22, 11", while
fmt.Sprintf("%[3]*[2].*[1]f", 12.0, 2, 6),
equivalent to
fmt.Sprintf("%6.2f", 12.0),
will yield " 12.00". Because an explicit index affects subsequent verbs,
this notation can be used to print the same values multiple times
by resetting the index for the first argument to be repeated:
fmt.Sprintf("%d %d %#[1]x %#x", 16, 17)
will yield "16 17 0x10 0x11".
The notation chosen differs from that in C, but I believe it's easier to read
and to remember (we're indexing the arguments), and compatibility with
C's printf was never a strong goal anyway.
While we're here, change the word "field" to "arg" or "argument" in the
code; it was being misused and was confusing.
R=rsc, bradfitz, rogpeppe, minux.ma, peter.armitage
CC=golang-dev
https://golang.org/cl/9680043
2013-05-24 16:49:26 -06:00
|
|
|
fmt: indexed access to arguments in Printf etc. (CL 9680043).
|
2013-05-24 14:34:50 -06:00
|
|
|
io: Copy prioritizes WriterTo over ReaderFrom (CL 9462044).
|
2013-05-30 10:41:20 -06:00
|
|
|
testing: AllocsPerRun is now quantized to an integer (the type is still float64) (CL 9837049).
|