Previously merely printing an error would cause the golden
file comparison (in 'bash run') to fail, but that is no longer
the case with the new run.go driver.
R=iant
CC=golang-dev
https://golang.org/cl/7310087
into separate package. This allows this code to be shared
with the search package without the need for these two to use
the same tables.
Adjusted various files accordingly.
R=rsc
CC=golang-dev
https://golang.org/cl/7213044
The lowering of ast.RangeStmt now has three distinct cases:
1) rangeIter for maps and strings; approximately:
it = range x
for {
k, v, ok = next it
if !ok { break }
...
}
The Range instruction and the interpreter's "iter"
datatype are now restricted to these types.
2) rangeChan for channels; approximately:
for {
k, ok = <-x
if !ok { break }
...
}
3) rangeIndexed for slices, arrays, and *array; approximately:
for k, l = 0, len(x); k < l; k++ {
v = x[k]
...
}
In all cases we now evaluate the side effects of the range expression
exactly once, per comments on http://code.google.com/p/go/issues/detail?id=4644.
However the exact spec wording is still being discussed in
https://golang.org/cl/7307083/. Further (small)
changes may be required once the dust settles.
R=iant
CC=golang-dev
https://golang.org/cl/7303074
Details:
- reorder.go: delete p8.
(Once expectation is changed per b/4627 it is identical to p1.)
- switch.go: added some more (degenerate) switches.
- range.go: improved error messages in a few cases.
- method.go: added tests of calls to promoted methods.
R=iant
CC=golang-dev
https://golang.org/cl/7306087
Simplify the internal logic for flags controlling what to vet,
by introducing a map of flags that gathers them all together.
This change should simplify the process of adding further flags.
Add a test for untagged struct literals.
Delete a redundant test that was also in the wrong file.
Clean up some ERROR patterns that weren't working.
"make test" passes again.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7305075
This is documenting the status quo. The previous cleanup
added this language as an implementation restriction, but
at least for now it is really part of the language proper.
Fixes#4605.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7305071
The gc compilers already behave this way. It was an explicit
decision during the very long constant design discussions,
but it appears not to have made it into the spec.
Fixes#4398.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7313069
This CL provides the rest of the SetCookies code as well as
some test infrastructure which will be used to test also
the Cookies method. This test infrastructure is optimized
for readability and tries to make it easy to review table
driven test cases.
Tests for all the different corner cases of SetCookies
will be provided in a separate CL.
R=nigeltao, rsc, bradfitz
CC=golang-dev
https://golang.org/cl/7306054
Fixes#4582.
* mentioned hg upload.
* added section on hg file.
* added small mention about being inside $GOROOT.
* added hg revert @NNNN
* reorganise the hg submit section for the common case of a non committer.
* made the Copyright section h2
* added note about leaving copyright years unchanged.
R=golang-dev, metanata4, shivakumar.gn, minux.ma, adg, shanemhansen
CC=golang-dev, metanata4
https://golang.org/cl/7278047
Support reading pax archives and applying extended attributes
like long names, subsecond mtime resolutions, etc. Default to
writing pax archives for long file and link names.
Support reading gnu archives using the ././@LongLink extended
header for file name and link target.
Fixes#3300
R=dsymonds, dave, rogpeppe, remyoudompheng, chressie, rsc
CC=golang-dev
https://golang.org/cl/6700047
Fixes#4010.
This proposal avoids cluttering the main install-source.html with OS specific instructions by linking to the wiki for details. See discussion in the comments.
R=adg, minux.ma
CC=golang-dev
https://golang.org/cl/7241068
The spec is not clear about whether this is allowed or not,
but both compilers allow it, because the reflect implementation
takes advantage of it. Document current behavior.
Fixes#4679.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7303064
On Windows, CryptoAPI is finding an alternative validation path. Since
this is a little non-deterministic, this change disables that test
when using system validation.
R=golang-dev
CC=golang-dev
https://golang.org/cl/7313068
By default, crypto/x509 assumes that users wish to validate
certificates for ServerAuth. However, due to historical reasons,
COMODO's intermediates don't specify ServerAuth as an allowed key
usage.
Rather NSS and CryptoAPI both allow these SGC OIDs to be equivalent to
ServerAuth.
R=rsc
CC=golang-dev
https://golang.org/cl/7312070
Add benchmark for request parsing. Fixture data is taken from https://github.com/felixge/node-http-perf
% go version
go version devel +28966b7b2f0c Thu Feb 07 20:26:12 2013 -0800 linux/amd64
% go test -run=nil -bench=ReadRequest -benchtime=10s
PASS
BenchmarkReadRequest 2000000 9900 ns/op 61.71 MB/s 3148 B/op 32 allocs/op
ok net/http 12.180s
R=golang-dev, bradfitz, minux.ma, haimuiba
CC=golang-dev
https://golang.org/cl/7313048
On POSIX, '=' in key is explicitly invalid, and '\x00' in key/value is implicitly invalid.
R=golang-dev, iant, bradfitz
CC=golang-dev
https://golang.org/cl/7311061
With the new scheduler races in the tests are reported during execution of other tests.
The change joins goroutines started during the tests.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7310066
The problem happens when end=0, then end-1 is very big number.
Observed with the new scheduler.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/7307073