The special case in the spec is that you can take the
address of a composite literal using the & operator.
A composite literal is not, however, generally addressable,
and the slice operator requires an addressable argument,
so [3]int{1,2,3}[:] is invalid. This tutorial code and one bug
report are the only places in the tree where it appears.
R=r, gri
CC=golang-dev
https://golang.org/cl/5437120
*** Reason for rollback ***
roll back the changes to the tutorial programs (only) since they
break the automated processing used to create the tutorial.
*** Original change description ***
apply gofmt to the LGTM-marked files from 34501
that have not changed since I applied gofmt.
R=rsc
DELTA=139 (0 added, 44 deleted, 95 changed)
OCL=35670
CL=35670
as a reminder, the old conversion
was that you could write
var arr [10]byte;
var slice []byte;
slice = arr;
but now you have to write
slice = &arr;
the change eliminates an implicit &, so that
the only implicit &s left are in the . operator
and in string(arr).
also, removed utf8.EncodeRuneToString
in favor of string(rune).
R=r
DELTA=83 (1 added, 23 deleted, 59 changed)
OCL=27531
CL=27534