In line with other functions such as Fprintf, put the
thing to be written first.
Apologies for the breakages this is sure to cause.
R=rsc, gri, adg, eds, r2, aam
CC=golang-dev
https://golang.org/cl/4169042
- added an example to Type declarations section clarifying the
situation brought up with issue 1324
- slightly re-ordered paragraphs in Types section
- added separate heading for method set section and refer to it
from elsewhere in the spec
- no language changes
R=rsc, r, iant, ken2, r2
CC=golang-dev
https://golang.org/cl/4145043
A couple of post-closure function definitions were introduced too early, making the resulting
code fail compilation.
Also, the TitleValidator regexp was missing.
R=adg
CC=golang-dev
https://golang.org/cl/4105054
Removed most of the detailed examples about handing panics
from the go spec since it's now covered by Effective Go.
R=r, rsc, iant, ken2
CC=golang-dev
https://golang.org/cl/4128058
This change makes it legal to pass a struct value as receiver
outside the package declaring the struct even if the respective
struct type has non-exported fields.
This is a backwards-compatible language change motivated by the
fact that it is already possible to circumvent the assignment
restriction when calling methods through interfaces (see issue
1402).
R=r, rsc, iant, ken2
CC=golang-dev
https://golang.org/cl/3926044
Prior to this CL, there were two requirements about the
package name main.
1. The package that sits at the root of the import graph
(the one where program execution begins)
must be named main.
2. No other package in the program can be named main.
This CL only removes requirement #2, which can be done
without changing any other Go documentation.
The new wording and formatting is such that removing
requirement #1 can be done by deleting a single line,
but making that change is explicitly outside the scope
of this CL, because it would require changes to other
documentation at the same time.
R=gri, r, gri1
CC=golang-dev
https://golang.org/cl/4126053
This aligns the naming scheme with the testing package and
also lets govet work on more logging calls.
R=rsc
CC=golang-dev
https://golang.org/cl/4001048
These are syntactical changes to better reflect the communication
operator's new status in the language.
- sending to a channel is now done via a send statement
- there is no binary communication operation anymore which
leads to a reduction of the number of precedence levels
from 6 to 5 (yeah!)
- small semantic change: since a send operation is not part
of the expression syntax anymore, a <- send operator is
binding weaker than any other operator now
- receiving from a channel is done as before via the unary
receive expression
- communication clauses in select statement now can contain
send statements or receive expressions
R=rsc, r, iant, ken2, gri1
CC=golang-dev
https://golang.org/cl/3973051
make test.sh runnable as a command.
announce only on 127.0.0.1.
rebuild final-test.bin when final-test.go changes.
R=adg, r
CC=golang-dev
https://golang.org/cl/4030044
Close of closed channel panics.
Receive from closed channel never panics,
even if done repeatedly.
Fixes#1349.
Fixes#1419.
R=gri, iant, ken2, r, gri1, r2, iant2, rog, albert.strasheim, niemeyer, ejsherry
CC=golang-dev
https://golang.org/cl/3989042
The default float type is not very useful but for the most basic applications.
For instance, as it is now, using the math package requires conversions for float
variables (the arguments for math functions are usually float64). Typical real
applications tend to specify the floating point precision required.
This proposal removes the predeclared types float and complex. Variable declarations
without type specification but with constant floating point or complex initializer
expressions will assume the type float64 or complex128 respectively.
The predeclared function cmplx is renamed to complex.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/3423041
Regular expressions may now be used in conjuction with full text
search. Godoc will show the first 10000 occurences in the source
code and highlight the respective text segments.
- added new flag -testDir to specify a small directory for testing
(fast index creation; default = "")
- use new FormatText function to format text and Go source
code in HTML, supporting multiple kinds of text selections
simulatenously); this replaces the uses of go/printer
Stylers
- for now removed currently unused mechanism for identifier-
specific JS popups (will come back in some form once we
have type or other useful information)
- various typo fixes and minor cleanups throughout
Missing:
- indexing of non-.go files
R=r, r2
CC=golang-dev, rsc
https://golang.org/cl/3699041
The original change 3378041 was submitted in December 2010:
template: change the signature of formatters for future development.
R=adg
CC=golang-dev
https://golang.org/cl/3862041