1
0
mirror of https://github.com/golang/go synced 2024-10-04 12:21:26 -06:00
Commit Graph

16859 Commits

Author SHA1 Message Date
Rob Pike
0bc7e79afd all: excise some warts found by vet -shadow
These are not erroneous, just poor or confusing.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/10448043
2013-06-20 16:14:40 -07:00
Ian Lance Taylor
ffde4970d0 doc: update gccgo docs
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/10401046
2013-06-20 14:49:15 -07:00
Brad Fitzpatrick
5b0bf9db8e net/http: fix confusing shadowing in ProxyFromEnvironment
The old code worked, somewhat on accident, but was confusing,
and had a useless assignment to the inner err. It worked
because url.Parse parses just about anything, so the outer err
was always nil, so it always fell through to the bottom return
statement, even without the "err = nil" line.

Instead, just have two return statements, and add a comment.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/10448044
2013-06-20 11:58:24 -07:00
Rob Pike
3e710c0ba5 all: fix shadowing bugs found by go tool vet -shadow
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/10328044
2013-06-20 11:50:44 -07:00
Rob Pike
9824b018ce cmd/go: put the coverage information on the summary line.
Output now:
ok  	crypto/aes	0.060s	coverage: 89.8% of statements
ok  	crypto/des	0.074s	coverage: 92.2% of statements
ok  	crypto/dsa	0.056s	coverage: 34.5% of statements
ok  	crypto/ecdsa	0.058s	coverage: 86.8% of statements
ok  	crypto/elliptic	0.039s	coverage: 94.6% of statements
ok  	crypto/hmac	0.037s	coverage: 93.5% of statements
ok  	crypto/md5	0.031s	coverage: 96.2% of statements
ok  	crypto/rand	0.074s	coverage: 9.9% of statements
ok  	crypto/rc4	0.090s	coverage: 66.7% of statements
ok  	crypto/rsa	0.253s	coverage: 83.5% of statements

R=rsc, adg
CC=golang-dev
https://golang.org/cl/10413044
2013-06-20 10:27:44 -07:00
Adam Langley
9035297266 crypto/x509: add function to marshal EC private keys.
This complements the parsing function that we already have.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/10426043
2013-06-20 12:14:16 -04:00
Rémy Oudompheng
004dd3d742 test: match gccgo error messages
R=iant, golang-dev
CC=golang-dev
https://golang.org/cl/10365052
2013-06-20 08:21:14 +02:00
Andrew Gerrand
2f70ac19d2 cmd/go: document that files beginning with . or _ are ignored
Fixes #5655.

R=golang-dev, minux.ma, r
CC=golang-dev
https://golang.org/cl/10410045
2013-06-20 10:29:38 +10:00
Adam Langley
966e889687 crypto/tls: change advertised ciphersuite order.
TLS clients send ciphersuites in preference order (most prefereable
first). This change alters the order so that ECDHE comes before plain
RSA, and RC4 comes before AES (because of the Lucky13 attack).

This is unlikely to have much effect: as a server, the code uses the
client's ciphersuite order by default and, as a client, the non-Go
server probably imposes its order.

R=golang-dev, r, raggi, jsing
CC=golang-dev
https://golang.org/cl/10372045
2013-06-19 16:46:53 -04:00
Rob Pike
cb2461ba46 cmd/go: another attempt at flag handling for coverage
The -cover flag is now just enable/disable and is implied if
either of the other flags is set.

R=rsc
CC=golang-dev
https://golang.org/cl/10420043
2013-06-19 09:44:40 -07:00
Rob Pike
27cca31ee1 cmd/go: simplify flags for coverage
The single flag -cover provides the default simplest behavior.
The other flags, -covermode and -coverprofile, provide more
control. The three flags interconnect to work well.

R=rsc, adg
CC=golang-dev
https://golang.org/cl/10364044
2013-06-18 17:15:26 -07:00
Rob Pike
8e8b8b85c2 cmd/go: write coverage to file, add percentage statistic
Move the data dumper to the testing package, where it has access
to file I/O.
Print a percentage value at the end of the run.

R=rsc, adg
CC=golang-dev
https://golang.org/cl/10264045
2013-06-18 14:18:25 -07:00
Robert Griesemer
6154ae8e24 math/big: fix Errorf verb
Pointed out by go vet.

R=r
CC=golang-dev
https://golang.org/cl/10368048
2013-06-18 14:16:40 -07:00
Russ Cox
269b2f2d4d cmd/gc: fix race detector on tail-call wrappers
(By not using the tail-call wrappers when the race
detector is enabled.)

R=golang-dev, minux.ma, dvyukov, daniel.morsing
CC=golang-dev
https://golang.org/cl/10227043
2013-06-18 14:43:37 -04:00
Cosmos Nicolaou
f882bc8708 os/exec: make exec_test.go:TestExtraFilesFDShuffle portable.
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/9103045
2013-06-18 08:55:32 -07:00
Dave Cheney
f9c22f7e78 cmd/cgo: avoid leaking fds
Fixes #5714.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/10386043
2013-06-18 23:20:17 +10:00
Andrew Gerrand
7468b1d36a doc: style tweaks in preparation for Google Feedback link
Fixes #5589.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/10272051
2013-06-18 15:26:15 +10:00
David Bürgin
c1e780c4e4 misc/vim: Added filetype settings for comments.
This basic Vim ftplugin sets the 'comments' and 'commentstring'
settings to sensible values. Future filetype settings for Go
would go in the same file.
The ftplugin was added as misc/vim/ftplugin/go/go.vim, this way
the installation instructions in readme.txt remain valid.
Fixes #5715.

R=dsymonds
CC=gobot, golang-dev
https://golang.org/cl/10323043
2013-06-18 14:59:50 +10:00
David Symonds
3a895563df A+C: David Bürgin (individual CLA)
Generated by addca.

R=gobot
CC=golang-dev
https://golang.org/cl/10372043
2013-06-18 14:59:23 +10:00
Alex Jin
83db738786 net/smtp: close conn in SendMail; add Client.Close method
R=rsc, dave, bradfitz
CC=golang-dev
https://golang.org/cl/10082044
2013-06-17 16:53:27 -07:00
Brad Fitzpatrick
beb6efa0fb A+C: Alex Jin (individual CLA)
Generated by addca.

R=gobot
CC=golang-dev
https://golang.org/cl/10286045
2013-06-17 16:42:15 -07:00
Paul van Brouwershaven
4bd79e742a crypto/x509: Added RFC 5280, section 4.2.1.14 to parseCertificate and buildExtensions
Support for CRL Distribution Points

R=golang-dev, agl, bradfitz
CC=golang-dev
https://golang.org/cl/10258043
2013-06-17 14:56:45 -07:00
Brad Fitzpatrick
944a260501 A+C: Paul van Brouwershaven (individual CLA)
Generated by addca.

R=gobot
CC=golang-dev
https://golang.org/cl/10332046
2013-06-17 14:55:26 -07:00
Nicolas Owens
2af974777d net: fix LookupNS on Plan 9
use correct field count when resolving nameservers via /net/dns on Plan 9.

we incorrectly check for 4 fields instead of 3 when parsing the result of /net/dns, and get no results

R=golang-dev, ality
CC=golang-dev
https://golang.org/cl/10182044
2013-06-17 11:38:07 -07:00
Brad Fitzpatrick
e8fbd4affb A+C: Nicolas Owens (individual CLA)
Generated by addca.

R=gobot
CC=golang-dev
https://golang.org/cl/10335044
2013-06-17 11:37:50 -07:00
Dan Peterson
563d09cd14 testing: use -bench flag and fix flags doc link
R=golang-dev, r, kr
CC=golang-dev
https://golang.org/cl/10263043
2013-06-17 07:32:28 -07:00
Brad Fitzpatrick
7099af9213 A+C: Dan Peterson (individual CLA)
Generated by addca.

R=gobot
CC=golang-dev
https://golang.org/cl/10340043
2013-06-17 07:31:39 -07:00
Brad Fitzpatrick
14e52c74bc crypto/cipher: StreamWriter.Closer docs + behavior change
Don't panic when the underlying Writer isn't a Closer. And
document what Close does and clarify that it's not a Flush.

R=golang-dev, agl
CC=golang-dev
https://golang.org/cl/10310043
2013-06-17 07:30:04 -07:00
Dmitriy Vyukov
d660688f14 runtime/race: add tests for method thunks
R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/10257043
2013-06-17 17:59:53 +04:00
Dmitriy Vyukov
f84cbd0950 runtime: fix test for new closure representation
I've hit it several times already.
Currently it crashes with nil deref.

R=golang-dev, daniel.morsing, r
CC=golang-dev
https://golang.org/cl/10317045
2013-06-17 15:41:17 +04:00
Benny Siegert
8a4efed63c run.bash: raise ulimit for the number of threads.
This is needed on NetBSD-current. Support for
ulimit -T in bash was added in 4.2nb3.

R=golang-dev, minux.ma, rsc, dave
CC=golang-dev
https://golang.org/cl/10078047
2013-06-17 19:31:58 +10:00
Dmitriy Vyukov
94dc963b55 runtime: fix race condition between GC and setGCPercent
If first GC runs concurrently with setGCPercent,
it can overwrite gcpercent value with default.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/10242047
2013-06-15 16:07:06 +04:00
Dmitriy Vyukov
4bb491b12e runtime: improve scheduler fairness
Currently global runqueue is starved if a group of goroutines
constantly respawn each other (local runqueue never becomes empty).
Fixes #5639.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/10042044
2013-06-15 16:06:28 +04:00
Dmitriy Vyukov
5caf762457 runtime: remove unused moreframesize_minalloc field
It was used to request large stack segment for GC
when it was running not on g0.
Now GC is running on g0 with large stack,
and it is not needed anymore.

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/10242045
2013-06-15 16:02:39 +04:00
Jonathan Rudenberg
8f6341d9ee cmd/godoc: don't link unexported identifiers
R=golang-dev, gri, gri
CC=golang-dev
https://golang.org/cl/9722045
2013-06-14 12:37:23 -07:00
Keith Randall
de316388a7 runtime: garbage collector runs on g0 now.
No need to change to Grunnable state.
Add some more checks for Grunning state.

R=golang-dev, rsc, khr, dvyukov
CC=golang-dev
https://golang.org/cl/10186045
2013-06-14 11:42:51 -07:00
Brad Fitzpatrick
39613054af api: update next.txt
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/10283043
2013-06-14 10:00:07 -07:00
Brad Fitzpatrick
61d3b2db62 net: coalesce duplicate in-flight DNS lookups
In Issue 5625, Russ says: "We should at least have a cache of
inflight lookups, so that 100 simultaneous dials of one host
name don't do the work 100x. That's easy and (assume we forget
the answer once they all get it) doesn't pose any consistency
problems. It just merges simultaneous work."

This brings in singleflight (unexported) from Google /
Camlistore, but without its tests. Maybe we should put it
somewhere in the standard library. But not now.

Update #5625

R=golang-dev, iant, cespare, rsc, dave, rogpeppe, remyoudompheng
CC=golang-dev
https://golang.org/cl/10079043
2013-06-14 08:59:43 -07:00
Rémy Oudompheng
3be794cdc2 cmd/gc: instrument arrays properly in race detector.
The previous implementation would only record access to
the address of the array but the memory access to the whole
memory range must be recorded instead.

R=golang-dev, dvyukov, r
CC=golang-dev
https://golang.org/cl/8053044
2013-06-14 11:14:45 +02:00
Caleb Spare
bc08124866 strconv: corrected several bad references to err.Error in doc comments.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/10253051
2013-06-13 17:04:47 -07:00
Rob Pike
92ea9fa108 cmd/go: change to use struct in go test -cover
Go tool half of https://golang.org/cl/10271044

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/10272043
2013-06-13 13:12:58 -07:00
Alan Donovan
568c4617ec go/ast: add {L,R}paren token.Pos field to ast.TypeAssertExpr.
These are required to correctly determine the End() of the node.

Also set these fields in go/parser and use them in go/printer.

This is a backward-compatible API change.

R=gri, r
CC=golang-dev
https://golang.org/cl/10189043
2013-06-13 14:41:44 -04:00
Dmitriy Vyukov
b9ddb0d8b3 runtime: fix bug introduced in cl/10256043
R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/10260043
2013-06-13 16:40:10 +04:00
Dmitriy Vyukov
e2d95c1f24 runtime/race: remove now unused step parameter from range access functions
R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/10259043
2013-06-13 16:38:44 +04:00
Dmitriy Vyukov
591d58a3bb cmd/gc: properly race-instrument for loops
Instrumentation of ntest expression should go to ntest->init.
Same for nincr.
Fixes #5340.

R=golang-dev, daniel.morsing
CC=golang-dev
https://golang.org/cl/10026046
2013-06-13 16:03:58 +04:00
Dmitriy Vyukov
2ffaefd161 runtime: use ROUND macro for rounding
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/10256043
2013-06-13 16:02:50 +04:00
Dmitriy Vyukov
cc99e6e949 runtime/race: update runtime to r183644
This revision properly handles memory range accesses.
Fixes #4453.
Fixes #5654.

R=golang-dev, iant, remyoudompheng
CC=golang-dev
https://golang.org/cl/10082043
2013-06-13 14:32:05 +04:00
Josh Hoak
b76ddefee5 misc/vim: Adding flag-guarding for Vim commands
Default behavior is the same as before, but now a user may selectively disable some commands.

Also: deleted the mappings for import.vim.

Tested: by trying the commands for fmt, import and godoc in succession to make sure they still work. Also, ran test.sh in ftplugin/go.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/10124043
2013-06-13 15:07:09 +10:00
Andrew Gerrand
e59a09fb1a tag go1.1.1
R=golang-dev, dave, iant
CC=golang-dev
https://golang.org/cl/10254043
2013-06-13 12:52:02 +10:00
Andrew Gerrand
55511d2b34 doc: add go1.1.1 to the release notes
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/10236045
2013-06-13 12:43:26 +10:00