The transport readLoop was waiting forever for the client to
read the non-existent body before proceeding to read the next
request.
R=rsc
CC=golang-dev
https://golang.org/cl/4357051
The error will only occur for invalid patterns, but without this
error path there is no way to know that Glob has failed due to
an invalid pattern.
R=rsc
CC=golang-dev
https://golang.org/cl/4346044
Write never writes less than the buffer size and WriteString takes advantage
of the copy built-in to improve write efficiency.
R=rsc, ality, rog
CC=golang-dev
https://golang.org/cl/4344060
According to RFC 3986: "For consistency, URI producers
and normalizers should use uppercase hexadecimal digits
for all percent-encodings." Using lower case characters
makes it incompatible with Google APIs when signing OAuth requests.
R=golang-dev, rsc1, rsc
CC=golang-dev
https://golang.org/cl/4352044
Since Go code can deadlock, this lets a testsuite driver set a
time limit for the test to run. This is simple but imperfect,
in that it only catches deadlocks in Go code, not in the
runtime scheduler.
R=r, rsc, iant2
CC=golang-dev
https://golang.org/cl/4326048
Also fix a bug: precision was in terms of bytes; should be runes.
Fixes#1652.
R=rsc, bradfitzgo, r2, bradfitzwork
CC=golang-dev
https://golang.org/cl/4280086
doc.go contains the details. The short story:
- command line is passed to the binary
- a new flag, -file, is needed to name files
- known flags have the "test." prefix added for convenience.
- gotest-specific flags are trimmed from the command line.
The effect should be that most existing uses are unaffected,
the ability to name files is still present, and it's nicer to use.
The downside is a lot more code in gotest.
Also allow a test to be called just Test.
R=rsc, niemeyer, rog, r2
CC=golang-dev
https://golang.org/cl/4307049
also: minor fix to parser
Note: gotest won't run the gotype test yet until
it permits TestXXX functions where XXX is empty.
R=r
CC=golang-dev
https://golang.org/cl/4300053
- don't consume '\n' as part of line comment
(otherwise grammars where '\n' are tokens won't
see them after a line comment)
- permit line comments to end in EOF
R=r
CC=golang-dev
https://golang.org/cl/4277089
As a special case, multi-line raw strings (i.e., strings in `` quotes)
were not indented if they were the only token on a line. This heuristic
was meant to improve formatting for multi-line raw strings where sub-
sequent lines are not indented at the level of the surrounding code.
Multiple people have complained about this. Removing the heuristic
again because it makes the formatting more regular, easier to under-
stand, and simplifies the implementation.
- manual changes to ebnf/ebnf_test.go for readability
- gofmt -w src misc
Fixes#1643.
R=r, rsc
CC=golang-dev
https://golang.org/cl/4307045
I'm in two minds as to whether this should be a function of gotest.
Tests that can flake out like this should be rare enough that we
needn't add more mechanism.
R=r
CC=golang-dev
https://golang.org/cl/4335042
Failing at compile time requires that for each conversion
between two interface types the compiler compare the sets of
unexported methods to see if they come from different
packages. Since this test will fail approximately never on
real code, and since it can't catch all cases of the problem,
I don't think it's worth testing in the compiler. This CL
changes this test to look for a run-time panic rather than a
compile-time error.
R=gri, rsc1, iant2, rsc
CC=golang-dev
https://golang.org/cl/4332041