New ftplugin adds Import and Drop commands for Go buffers
in Vim. These commands ensure that the provided package is
imported (or not imported) in the current Go buffer, using
proper style and ordering, without moving the cursor.
E.g.
:Import strings
:ImportAs . strings
:Drop strings
Two mappings are also introduced to help with the fmt package:
\f => :Import fmt
\F => :Drop fmt
R=adg
CC=golang-dev
https://golang.org/cl/4009043
Init may report an error on the first character and
thus one needs an ability to set the error handler
for Init. Was a design bug.
Added corresponding test cases and better documentation.
Also: Fixed a subtle infinite loop exposed by one of the
new test cases.
Fixes#1380.
R=rsc, gri
CC=golang-dev
https://golang.org/cl/4094041
Uploading go files on Windows aborts with gofmt: exceptions.ValueError:
close_fds is not supported on Windows platforms if you redirect stdin/stdout/stderr
R=rsc, mattn, Joe Poirier
CC=golang-dev
https://golang.org/cl/4025046
If a file pattern is given and matches files that look
like they need to be hg added or hg removed, offer to do so.
If a file pattern is given and matches files in another CL, warn.
If a file pattern doesn't match anything, point that out.
Vet first line of CL description.
Fixes#972.
R=adg, niemeyer
CC=bradfitzgo, golang-dev
https://golang.org/cl/4099042
When parsing numbers with an exponent (like "12e-1"), the JSON scanner
would only allow a lowercase 'e', while the RFC also allows the
uppercase 'E'.
R=adg
CC=golang-dev, rsc
https://golang.org/cl/3986042
(or at least a correct encoder, still to come).
Change the debug structure slightly to better represent
the grammar.
Minor tweaks for consistency in type.go.
R=rsc
CC=golang-dev
https://golang.org/cl/4007044
The test code used to do this:
for _, tc := range tests {
ch <- &tc
}
Note that &tc is always the same value here. As the value is
received from the channel, the sender can loop around and
change the contents of tc. This means that the receiver's
value is unstable and can change while it is in use.
R=adg, r2, rsc
CC=chris, golang-dev
https://golang.org/cl/3978043
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
There were duplicate closes and missing closes,
with the result that the program was rarely testing
as much as it seemed to be. Now it finishes.
R=r
CC=golang-dev
https://golang.org/cl/4008046
Re-implement the debugging helper to be independent of the existing
implementation. This is preparatory to a rewrite to clean up issue 1416.
Include a definition of the grammar of the data stream.
R=rsc
CC=golang-dev
https://golang.org/cl/3970045
This was broken after the last update (2011-01-20).
However, I'm not sure if the changed example is a
sensible use of import(), so I'd appreciate comments.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4067043
The functionality we want (shared ppid) is implied
by CLONE_THREAD already, and CLONE_PARENT
causes problems if the Go program is pid 1 (init).
See issue 1406 for more details.
Fixes#1406.
R=adg, iant
CC=golang-dev
https://golang.org/cl/3971044
Also remove second email address from AUTHORS file
in a few cases. It only has a meaning in the CONTRIBUTORS file.
R=r, gri
CC=golang-dev
https://golang.org/cl/4022042
The o+i*p approach to visiting select cases in random
order stops being fair when there is some case that
is never ready. If that happens, then the case that follows
it in the order gets more chances than the others.
In general the only way to ensure fairness is to make
all permutations equally likely. I've done that by computing
one explicitly.
Makes the permutations correct for n >= 4 where
previously they were broken. For n > 12, there's not
enough randomness to do a perfect job but this should
still be much better than before.
Fixes#1425.
R=r, ken2, ejsherry
CC=golang-dev
https://golang.org/cl/4037043
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