Commit Graph

7945 Commits

Author SHA1 Message Date
Brad Fitzpatrick
883048daab http: add Transport.MaxIdleConnsPerHost
R=rsc
CC=golang-dev
https://golang.org/cl/4280079
2011-03-31 12:58:50 -07:00
Alexey Borzenkov
10694c81b0 net, syscall: fix windows build
Fix resolv_windows.go to support recent DNS-lookup changes

R=brainman, rsc1, rsc
CC=golang-dev
https://golang.org/cl/4300045
2011-03-31 15:16:18 +11:00
Rob Pike
7d77e3117c gotest: another try at flags.
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
2011-03-30 21:14:49 -07:00
Russ Cox
5a7a074261 gopack: comment out debugging print
TBR=r
CC=golang-dev
https://golang.org/cl/4333048
2011-03-30 22:41:32 -04:00
Russ Cox
3d2e57a312 gopack: add P flag to remove prefix from filename information
R=r, r2
CC=golang-dev
https://golang.org/cl/4307047
2011-03-30 22:19:02 -04:00
Russ Cox
b66b22cdd4 fmt: remove uintptrGetter type checks
This will make the fmt code easier to gofix
when the new reflect interface is ready.

R=r
CC=golang-dev
https://golang.org/cl/4324043
2011-03-30 22:12:30 -04:00
Robert Griesemer
7a5bbfd47f gotype: support for more tests, added one new test
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
2011-03-30 15:27:23 -07:00
Robert Griesemer
e64d337726 scanner: treat line comments like in Go
- 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
2011-03-30 15:26:53 -07:00
Ian Lance Taylor
e008757d64 test: don't require specific GOARCH values.
This lets the test work for gccgo on other architectures.

R=r, rsc1
CC=golang-dev
https://golang.org/cl/4326044
2011-03-30 14:24:32 -07:00
Robert Griesemer
61aaadf217 gotest: exclude . files when parsing directories (per r's suggestion)
R=r, rsc1, iant2
CC=golang-dev
https://golang.org/cl/4329044
2011-03-30 09:46:11 -07:00
Roger Peppe
dba96cf411 go/parser: fix scoping for local type declarations
R=gri
CC=golang-dev
https://golang.org/cl/4332045
2011-03-30 09:45:51 -07:00
Andrew Gerrand
6b567d26b7 godoc: remove errant space in HTML tag
R=gri
CC=golang-dev
https://golang.org/cl/4277087
2011-03-30 16:41:41 +11:00
Robert Griesemer
1afc37fa7e go/printer/gofmt: remove special case for multi-line raw strings
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
2011-03-29 18:30:59 -07:00
Andrew Gerrand
d54c4ecc32 time: make TestAfterQueuing retry 3 times before declaring failure.
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
2011-03-30 11:40:00 +11:00
Ian Lance Taylor
57c6d36f95 test: add test for interfaces with unexported methods.
R=rsc
CC=golang-dev
https://golang.org/cl/4271086
2011-03-29 15:04:19 -07:00
Ian Lance Taylor
3dbf65871c test: adjust bug324 to expect run-time failure, not compile-time.
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
2011-03-29 15:03:09 -07:00
Adam Langley
974d2c98e0 crypto/tls: extend NPN support to the client.
R=bradfitzgo, rsc1, bradfitzwork
CC=golang-dev
https://golang.org/cl/4277085
2011-03-29 17:53:09 -04:00
Rob Pike
d844aae690 prints: fix a couple of formatting errors caught by govet
R=rsc, agl, agl1
CC=golang-dev
https://golang.org/cl/4337041
2011-03-29 14:03:08 -07:00
Rob Pike
fb80f63cf7 gotest: replace the shell script with the compiled program written in go.
Update the make sequence: gotest must now be installed after the packages.

R=rsc
CC=golang-dev
https://golang.org/cl/4323044
2011-03-29 13:29:20 -07:00
Rob Pike
518c0adb17 govet: fix bug introduced at 4313054
R=rsc, gri
CC=golang-dev
https://golang.org/cl/4336042
2011-03-29 13:18:52 -07:00
Rob Pike
f61b7e5dc5 gotry: move into its own directory, separate from gotest.
R=rsc
CC=golang-dev
https://golang.org/cl/4327045
2011-03-29 13:00:24 -07:00
Rob Pike
62ed6ee6c4 ngotest: correctly handle packages with tests outside the package.
R=rsc
CC=golang-dev
https://golang.org/cl/4330043
2011-03-29 12:50:41 -07:00
Adam Langley
9225bbfc0c crypto/cipher: bad CTR IV length now triggers panic
R=rsc
CC=golang-dev
https://golang.org/cl/4326042
2011-03-29 15:47:35 -04:00
Albert Strasheim
d41d6fec10 syscall: StartProcess Chroot and Credential.
R=rsc, iant, agl1
CC=golang-dev
https://golang.org/cl/4280065
2011-03-29 14:29:22 -04:00
Alexey Borzenkov
0793176451 net: move bind back to sock.go
It was left in netFD.connect() by an oversight (as the name
implies, bind has no business being in connect). As a result
of this change and by only calling netFD.connect() when ra
isn't nil it becomes simpler with less code duplication.

Additionally, if netFD.connect() fails, set sysfd to -1 to
avoid finalizers (e.g. on windows) calling shutdown on a
closed and possibly reopened socket that just happened to
share the same descriptor.

R=golang-dev, rsc1, rsc
CC=golang-dev
https://golang.org/cl/4328043
2011-03-29 14:23:42 -04:00
David Forsythe
85c79ef7cb os: fix FileInfo.Name returned by Stat
Fixes #1645.

R=rsc
CC=golang-dev
https://golang.org/cl/4321045
2011-03-29 14:23:36 -04:00
Russ Cox
04b7da80cc A+C: David Forsythe (individual CLA)
R=golang-dev, r2
CC=golang-dev
https://golang.org/cl/4333041
2011-03-29 14:18:45 -04:00
Rob Pike
d74ff67cc8 debug/gosym: remove need for gotest to run preparatory commands.
Put them into the Makefile instead. One dependency mechanism is enough.

R=rsc
CC=golang-dev
https://golang.org/cl/4331043
2011-03-29 10:41:23 -07:00
Rob Pike
e393efc499 ngotest: a new gotest command, written in Go.
It runs all tests correctly and saves significant time by avoiding the shell script.
However, this is just the code for the command, for review.
A separate CL will move this into the real gotest, which will take some dancing.

R=rsc, peterGo, bsiegert, albert.strasheim, rog, niemeyer, r2
CC=golang-dev
https://golang.org/cl/4281073
2011-03-29 10:11:33 -07:00
Robert Griesemer
536531769b CL 4291070: incorporating rsc's feedback
R=rsc
CC=golang-dev
https://golang.org/cl/4313054
2011-03-29 09:08:23 -07:00
Mikkel Krautz
a7bb288f99 crypto/x509: Parse Extended Key Usage extension
This changeset makes it possible for crypto/x509 to parse
certificates that include the 'Extended Key Usage' extension
with the critical bit set.

R=agl1
CC=golang-dev
https://golang.org/cl/4277075
2011-03-29 10:35:34 -04:00
Adam Langley
054516338a asn1: extensions needed for parsing Kerberos
* Adds support for GENERAL STRING
* Adds support for APPLICATION tagged values.
* Add UnmarshalWithParams to set parameters for the top-level
  structure

R=golang-dev, rsc1, r
CC=golang-dev
https://golang.org/cl/4291075
2011-03-29 10:33:47 -04:00
Ian Lance Taylor
61c9d3f08a test: adjust bugs/bug322 to match current spec.
R=gri, rsc1
CC=golang-dev
https://golang.org/cl/4328041
2011-03-29 06:49:21 -07:00
Ian Lance Taylor
469a747e02 test: avoid undefined error in syntax/if.go.
Without this the gccgo version of errchk reports an unmatched
error.

R=golang-dev, rsc1
CC=golang-dev
https://golang.org/cl/4327041
2011-03-29 06:48:20 -07:00
Ian Lance Taylor
0bc37a6d22 test: match gccgo error messages for syntax/chan.go.
chan.go:11:1: error: unexpected ‘}’ in channel type
chan.go:13:16: error: unexpected ‘)’ in channel type
chan.go:16:16: error: unexpected comma in channel type

R=golang-dev, rsc1
CC=golang-dev
https://golang.org/cl/4313055
2011-03-29 06:47:39 -07:00
Evan Shaw
47f4ae1a78 bytes, strings: simplify Join
R=gri, rsc
CC=golang-dev
https://golang.org/cl/4300044
2011-03-29 01:27:38 -04:00
Evan Shaw
ac74f14b6b kate: reorganize, remove closed()
R=rsc
CC=golang-dev
https://golang.org/cl/4325041
2011-03-29 01:12:39 -04:00
Alexey Borzenkov
2f45f72dce net: implement non-blocking connect
Refactored bind/connect from sock.go into netFD.connect(), as
a consequence newFD() doesn't accept laddr/raddr anymore, and
expects an (optional) call to netFD.connect() followed by a
call to netFD.setAddr().
Windows code is updated, but still uses blocking connect,
since otherwise it needs support for ConnectEx syscall.

R=brainman, rsc
CC=golang-dev
https://golang.org/cl/4303060
2011-03-28 23:40:01 -04:00
Russ Cox
98828f033a fix build
TBR=adg
CC=golang-dev
https://golang.org/cl/4322041
2011-03-28 23:39:39 -04:00
Russ Cox
2a1b4a83fc gofix: netdial
R=adg
CC=golang-dev
https://golang.org/cl/4278053
2011-03-28 23:29:00 -04:00
Russ Cox
5546cc7eab update tree for package net changes
Converted with gofix.

R=adg
CC=golang-dev
https://golang.org/cl/4284049
2011-03-28 23:28:53 -04:00
Russ Cox
41f93a430f net: drop laddr from Dial, cname from LookupHost; new functions
Drop laddr argument from Dial.

Drop cname return from LookupHost.

Add LookupIP, LookupCNAME, ParseCIDR, IP.Equal.
Export SplitHostPort, JoinHostPort.
Add AAAA (IPv6) support to host lookups.

Preparations for implementing some of the
lookups using cgo.

ParseCIDR and IP.Equal are logically new in this CL
but accidentally snuck into an earlier CL about unused
labels that was in the same client.

In crypto/tls, drop laddr from Dial to match net.

R=golang-dev, dsymonds, adg, rh
CC=golang-dev
https://golang.org/cl/4244055
2011-03-28 23:28:42 -04:00
Andrew Gerrand
188a17db80 tag release.2011-03-28
R=rsc
CC=golang-dev
https://golang.org/cl/4321041
2011-03-29 14:19:21 +11:00
Andrew Gerrand
33e41802f9 weekly.2011-03-28
R=r, rsc
CC=golang-dev
https://golang.org/cl/4272072
2011-03-29 14:17:04 +11:00
Robert Griesemer
5a3aae4bf7 go/printer, gofmt: rely on existing line breaks when formatting expression lists
No impact on existing sources.

Fixes #1632.

R=rsc
CC=golang-dev
https://golang.org/cl/4271083
2011-03-28 18:48:52 -07:00
Robert Griesemer
b2658452a6 go/scanner: return literal as string instead of []byte
Removed many string conversions in dependent code.
Runs all tests. No change to gofmt output.

R=r
CC=golang-dev
https://golang.org/cl/4291070
2011-03-28 16:44:28 -07:00
Robert Griesemer
c98145fb50 godoc: fix spelling error
R=r, r2
CC=golang-dev
https://golang.org/cl/4289079
2011-03-28 15:55:48 -07:00
Ian Lance Taylor
d38d66e646 doc: gccgo now supports method expressions and multiple init functions.
R=gri
CC=golang-dev
https://golang.org/cl/4314047
2011-03-28 14:48:35 -07:00
Robert Griesemer
2796ac1466 go/token: use array instead of map for token->string table
R=rsc
CC=golang-dev
https://golang.org/cl/4284070
2011-03-28 13:38:24 -07:00
Ian Lance Taylor
0caa0c0923 net: let OS-specific AddFD routine wake up polling thread.
With gccgo some operating systems require using select rather
than epoll or kevent.  Using select means that we have to wake
up the polling thread each time we add a new file descriptor.
This implements that in the generic code rather than adding
another wakeup channel, even though nothing in the current net
package uses the capability.

R=rsc, iant2
CC=golang-dev
https://golang.org/cl/4284069
2011-03-28 12:39:09 -07:00