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

9784 Commits

Author SHA1 Message Date
Russ Cox
6b0929505b cmd/go: fix two bugs
Issue 3207 was caused by setting GOPATH=GOROOT.
This is a common mistake, so diagnose it at command start
and also correct the bug that it caused in get (downloading
to GOROOT/src/foo instead of GOROOT/src/pkg/foo).

Issue 3268 was caused by recognizing 'packages' that
had installed binaries but no source.  This behavior is not
documented and causes trouble, so remove it.  We can
revisit the concept of binary-only packages after Go 1.

Fixes #3207.
Fixes #3268.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5930044
2012-03-27 10:41:44 -04:00
Alex Brainman
7a39654174 path/filepath: use windows GetShortPathName api to force GetLongPathName to do its work
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5928043
2012-03-27 15:53:08 +11:00
Russ Cox
d6c9af6a4e cmd/go: update for go1 tag format
R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/5919048
2012-03-27 00:17:50 -04:00
Russ Cox
901ee5c151 cmd/dist: fix detection of go1 version
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5924044
2012-03-27 00:17:35 -04:00
Devon H. O'Dell
a63c37b91e net: ignore ECONNABORTED from syscall.Accept
Fixes #3395.

R=rsc, dsymonds
CC=golang-dev
https://golang.org/cl/5905063
2012-03-27 00:06:14 -04:00
Mikio Hara
4c2614c57c undo CL 5844051 / 5d0322034aa8
Breaks closure test when GOMAXPROCS=2 or more.

««« original CL description
runtime: restore deadlock detection in the simplest case.

Fixes #3342.

R=iant, r, dave, rsc
CC=golang-dev, remy
https://golang.org/cl/5844051

»»»

R=rsc
CC=golang-dev
https://golang.org/cl/5924045
2012-03-27 13:05:17 +09:00
Russ Cox
a3498f4be4 cmd/go: copy tag_test.go from goinstall
hg cat -r 11846 src/cmd/goinstall/tag_test.go >tag_test.go
No changes.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5919047
2012-03-26 23:44:30 -04:00
Rémy Oudompheng
84bb2547fb runtime: restore deadlock detection in the simplest case.
Fixes #3342.

R=iant, r, dave, rsc
CC=golang-dev, remy
https://golang.org/cl/5844051
2012-03-26 23:06:20 -04:00
Alex Brainman
cf13bd3fab path/filepath: convert drive letter to upper case in windows EvalSymlinks
Fixes #3347.

R=golang-dev, aram, r, rsc
CC=golang-dev
https://golang.org/cl/5918043
2012-03-27 12:56:56 +11:00
Andrew Gerrand
849ad2d0ca cmd/godoc: canonicalize custom path redirects
For example, /ref and /doc/reference.html now both redirect to /ref/.

Fixes #3401.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5916044
2012-03-27 12:44:17 +11:00
Andrew Gerrand
fd9c206718 cmd/godoc: fix app engine version
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5902060
2012-03-27 10:10:25 +11:00
Robert Griesemer
5390722100 exp/types: generalized GCImporter API.
- Renamed ExportData -> FindGcExportData
  and base it on an a bufio.Reader rather
  than a filename so it can be used in
  environments where object files are
  stored elsewhere.

- Factor former GcImporter into GcImportData
  and GcImport. Implementations with different
  storage locations for object files can build
  a customized GcImport using GcImportData.

This is pkg/exp only - no impact on Go 1.

R=golang-dev, lvd, rsc
CC=golang-dev
https://golang.org/cl/5574069
2012-03-26 11:26:05 -07:00
Rob Pike
6421bdeb71 cmd/go: explain versions better
Summarize the desiderata for selecting versions of remote packages to get.
Fixes #3394.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5902058
2012-03-26 17:47:39 +11:00
Rob Pike
072646cd17 run.bash: set -e in new codewalk block
Otherwise we won't fail if something goes wrong.
This shell programming stuff is tricky.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5905062
2012-03-26 17:03:04 +11:00
Rob Pike
6492cac6dd run.bash: compile the codewalks
They could be tested but that requires more than seems wise right now.

Update #2648.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5908054
2012-03-26 16:08:21 +11:00
Shenghou Ma
304404895d cmd/go: allow underscores in tool name
Otherwise we can't invoke go_bootstrap directly.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5900061
2012-03-26 10:01:17 +08:00
Shenghou Ma
d1f6e27880 go/build: cgoEnabled is not known to cmd/dist anymore
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5901051
2012-03-26 10:00:06 +08:00
Evan Shaw
c26b504b0d cmd/go: add missing error check
R=golang-dev, minux.ma, bradfitz
CC=golang-dev
https://golang.org/cl/5874055
2012-03-26 09:52:29 +08:00
Stefan Nilsson
2dfcbd0a3b os: add missing byte to FileMode buffer
32 bytes is enough for all FileMode bits.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5853044
2012-03-24 08:16:57 +11:00
Robert Griesemer
43ad726f34 text/template: fix typo in package comment
Fixes #3383.

R=iant, bradfitz
CC=golang-dev
https://golang.org/cl/5891045
2012-03-23 11:31:29 -07:00
Adam Langley
1d8ec87135 crypto/tls: don't select ECC ciphersuites with no mutual curve.
The existing code that tried to prevent ECC ciphersuites from being
selected when there were no mutual curves still left |suite| set.
This lead to a panic on a nil pointer when there were no acceptable
ciphersuites at all.

Thanks to George Kadianakis for pointing it out.

R=golang-dev, r, bradfitz
CC=golang-dev
https://golang.org/cl/5857043
2012-03-23 10:48:51 -04:00
Alex Brainman
f39ff80bea path/filepath: windows drive letter cannot be a digit
R=golang-dev, r
CC=golang-dev, mattn.jp
https://golang.org/cl/5885056
2012-03-23 15:57:19 +11:00
Ian Lance Taylor
209b2e55f7 cmd/gc: fix comment typo, assignment spacing
R=bradfitz, gri, lvd
CC=golang-dev
https://golang.org/cl/5874053
2012-03-22 11:40:12 -07:00
Ian Lance Taylor
47b6197a01 cmd/gc: when expanding append inline, preserve arguments
Fixes #3369.

R=golang-dev, gri, lvd, r
CC=golang-dev
https://golang.org/cl/5876044
2012-03-22 09:44:31 -07:00
Stefan Nilsson
08959defa8 sort: add time complexity to doc
Let's tell the world that Go's sort is O(n log n).
Surely this is a feature we intend to keep.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5867045
2012-03-22 09:27:02 -07:00
Francisco Souza
289a357104 doc: add JSON and Go article
Originally published on The Go Programming Language Blog, January 25, 2011.

http://blog.golang.org/2011/01/json-and-go.html

R=adg
CC=golang-dev
https://golang.org/cl/5846044
2012-03-22 18:25:40 +11:00
Rob Pike
07e887f433 flag: add examples
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5867049
2012-03-22 11:15:43 +11:00
Robert Griesemer
f5f80368c4 exp/norm/normalize.go: fix typo
R=golang-dev, r, dsymonds
CC=golang-dev
https://golang.org/cl/5874045
2012-03-21 14:55:05 -07:00
Shenghou Ma
7186e56573 go/build: clarify why we exclude files starting with '_' or '.'
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5864053
2012-03-22 03:18:47 +08:00
Robert Griesemer
cfd8b84f07 godoc: use shorter titles for tabs
In a browser with many open tabs, the tab titles become short
and uninformative because they all start with the same prefix
("Package ", "Directory ", etc.).

Permit use of shorter tab titles that start with the relevant
information first.

Fixes #3365.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5865056
2012-03-21 11:29:30 -07:00
Ian Lance Taylor
3a3c5aad4e cmd/cgo: fix handling of errno for gccgo
Fixes #3332.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5868047
2012-03-21 10:38:58 -07:00
Shenghou Ma
2ceb653b8b build: lengthen timeout for the lengthy runtime test
To fix build on (overheated) Linux/ARM builder.

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/5865051
2012-03-21 16:19:37 +08:00
David Symonds
4a59be0091 html/template: fix typo and make grammar consistent in comments.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5866044
2012-03-21 10:10:44 +11:00
Stefan Nilsson
c5488d4f00 sort: fix computation of maxDepth to avoid infinite loop
The current computation loops indefinitely if n > 1<<30 (for 32-bit ints).

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5848067
2012-03-20 14:23:12 -07:00
Ian Lance Taylor
c5b45aa991 cmd/go: use .o, not .{5,6,8}, for gccgo created object files
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5861044
2012-03-20 14:17:06 -07:00
Brad Fitzpatrick
65dc7dc90b sort: document two undocumented functions
They looked out of place in godoc.
Includes documenting sort stability.

Fixes #3356

R=golang-dev, gri, trolleriprofessorn
CC=golang-dev
https://golang.org/cl/5855044
2012-03-20 11:40:41 -07:00
Shenghou Ma
4b1933dfb2 runtime: remove unused goc2c.c
Its functionality has been moved into cmd/dist.

R=golang-dev, r, iant
CC=golang-dev
https://golang.org/cl/5843062
2012-03-21 00:49:45 +08:00
Shenghou Ma
23322ab841 build: unset GOPATH before tests
This is because we disallow local import for non-local packages, if
GOROOT happens to be under one of GOPATH, then some tests will fail
to build.
Fixes #3337.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5852043
2012-03-21 00:47:27 +08:00
Alex Brainman
8521811cde run.bat: disable test in test\bench\go1 to fix build
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5848066
2012-03-20 14:59:51 +11:00
Rob Pike
49be7f7d0d html/template: add Templates and *Escape functions
to bring it in line with text/template's interface.
Fixes #3296.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5843066
2012-03-20 14:38:07 +11:00
Andrew Gerrand
abdb4dbe2c cmd/godoc: inform users that the playground doesn't work via local godoc
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5843065
2012-03-20 14:11:38 +11:00
Alex Brainman
7fbef930a6 build: do more during windows build
- use GO_GCFLAGS and GO_LDFLAGS if supplied
- build misc\dashboard\builder and misc\goplay
- run tests in test\bench\go1
- check api compatibility

R=golang-dev, r, kardianos, bradfitz
CC=golang-dev
https://golang.org/cl/5847063
2012-03-20 14:04:20 +11:00
Mikio Hara
7905faaee2 net: drop unnecessary type assertions and fix leak in test
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5847064
2012-03-20 10:57:54 +09:00
Anthony Martin
e1f22bdcc5 gc: fix struct and array comparisons for new bool rules
The two optimizations for small structs and arrays
were missing the implicit cast from ideal bool.

Fixes #3351.

R=rsc, lvd
CC=golang-dev
https://golang.org/cl/5848062
2012-03-19 15:57:28 -07:00
Adam Langley
aa1d4170a4 crypto/tls: always send a Certificate message if one was requested.
If a CertificateRequest is received we have to reply with a
Certificate message, even if we don't have a certificate to offer.

Fixes #3339.

R=golang-dev, r, ality
CC=golang-dev
https://golang.org/cl/5845067
2012-03-19 12:34:35 -04:00
Alex Brainman
2ef4a84022 path/filepath: implement Match and Glob on windows
As discussed on golang-dev, windows will use
"\" as path separator. No escaping allowed.

R=golang-dev, r, mattn.jp, rsc, rogpeppe, bsiegert, r
CC=golang-dev
https://golang.org/cl/5825044
2012-03-19 16:51:06 +11:00
Rob Pike
1f6fc949f6 sysycall: remove creds_linux_test.go
It is unprecedented to add tests to package syscall, especially
system-specific ones. Not a policy worth changing right before Go 1
is cut.

The sole existing test, passfd_test.go, contains the line
        // +build linux darwin probablyfreebsd probablyopenbsd
which argues that this is not a subject to be undertaking likely.
Note that passfd_test.go also went in just now. It's the only test
in syscall.

Deleting for now, will reconsider after Go 1.

R=golang-dev, bradfitz, r, dsymonds
CC=golang-dev
https://golang.org/cl/5846063
2012-03-19 11:15:28 +11:00
Rob Pike
4161dfc4fe syscall: delete passfd_test.go
We can revisit the issue of testing in syscall after Go 1.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5844057
2012-03-19 11:12:32 +11:00
Albert Strasheim
6a0544091e syscall: Test SCM_CREDENTIALS, SO_PASSCRED on Linux.
R=bradfitz, iant
CC=golang-dev
https://golang.org/cl/5846059
2012-03-18 10:03:00 -07:00
Brad Fitzpatrick
c97cf055d9 syscall: add a test for passing an fd over a unix socket
Updates #1101

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5849057
2012-03-17 22:19:57 -07:00
Brad Fitzpatrick
f69132d7ad build: catch API changes during build
Adds new file api/go1.txt, locking down the current API.
Any changes to the API will need to update that file.

run.bash (but not make.bash, or Windows) will check for
accidental API changes.

R=golang-dev, dsymonds, rsc
CC=golang-dev
https://golang.org/cl/5820070
2012-03-17 11:20:46 -07:00
Rob Pike
883a96d950 spec: delete references to unsafe.Reflect,Typeof,Unreflect
They have been deleted from package unsafe.
Also delete their appearance in exp/types.

Fixes #3338.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5847056
2012-03-17 22:50:59 +11:00
Johan Euphrosine
2b3fd37066 godoc: use FormatText for formating code in html template.
R=golang-dev, rsc, r, adg, gri, r
CC=golang-dev
https://golang.org/cl/5835046
2012-03-16 15:33:05 -07:00
Russ Cox
cf0cbfd21a cmd/go: don't add detail to errPrintedOutput
This makes the last error-reporting CL a bit less
aggressive.  errPrintedOutput is a sentinel value
that should not be wrapped.

R=gri
CC=golang-dev
https://golang.org/cl/5845052
2012-03-16 16:35:16 -04:00
Shenghou Ma
367557cd79 cmd/pack: also recognize '\\' as path separator in filenames
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5841051
2012-03-17 01:34:44 +08:00
Robert Griesemer
cb4ed897a3 godoc: apply gofmt
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5842043
2012-03-16 09:58:23 -07:00
Shenghou Ma
4aaf03aa74 make.bat: don't show error message if old generated files do not exist
R=golang-dev, alex.brainman, mattn.jp
CC=golang-dev
https://golang.org/cl/5843045
2012-03-17 00:32:48 +08:00
Shenghou Ma
9b70c70ffb cmd/go: add -fno-common by default on Darwin
Fixes part of issue 3253.
        We still need to support scattered relocations though.

R=golang-dev, bsiegert, rsc, iant
CC=golang-dev
https://golang.org/cl/5822050
2012-03-16 12:05:09 -04:00
Russ Cox
a4b2c5efbc cmd/go: work around occasional ETXTBSY running cgo
Fixes #3001.  (This time for sure!)

R=golang-dev, r, fullung
CC=golang-dev
https://golang.org/cl/5845044
2012-03-16 10:44:09 -04:00
David Symonds
11cc5a26d5 reflect: panic if MakeSlice is given bad len/cap arguments.
Fixes #3330.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5847043
2012-03-16 17:28:16 +11:00
Christopher Redden
8009542f55 make.bat: Fix for old files
Same fix as applied here: https://golang.org/cl/5761044

Fixes #3222.

R=golang-dev, alex.brainman, rsc
CC=golang-dev
https://golang.org/cl/5838043
2012-03-16 14:30:43 +11:00
Russ Cox
2e4a035995 runtime: do not handle signals before configuring handler
There was a small window during program initialization
where a signal could come in before the handling mechanisms
were set up to handle it.  Delay the signal-handler installation
until we're ready for the signals.

Fixes #3314.

R=golang-dev, dsymonds, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5833049
2012-03-15 22:17:54 -04:00
Yasuhiro Matsumoto
7694da1f3b cmd/gofmt: show ascii in usage.
windows cmd.exe can't show utf-8 correctly basically.
chcp 65001 may make it show, but most people don't have fonts which can
show it.

R=golang-dev, rsc, adg, gri, r
CC=golang-dev
https://golang.org/cl/5820060
2012-03-15 16:38:27 -07:00
Rémy Oudompheng
3211b2cca9 cmd/cgo: add support for function export for gccgo.
A "gccgoprefix" flag is added and used by the go tool,
to mirror the -fgo-prefix flag for gccgo, whose value
is required to know how to access functions from C.

Trying to export Go methods or unexported Go functions
will not work.

Also fix go test on "main" packages.

Updates #2313.
Fixes #3262.

R=mpimenov, rsc, iant
CC=golang-dev
https://golang.org/cl/5797046
2012-03-15 23:50:25 +01:00
Brad Fitzpatrick
86c7bc6e8b misc/dist: don't ship cmd/cov or cmd/prof
Fixes #3317

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5784083
2012-03-15 15:22:56 -07:00
Brad Fitzpatrick
c898c519b0 cmd/go: quiet some logging
This should've been behind -v before but was missed.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5836046
2012-03-15 15:10:01 -07:00
Russ Cox
bd6404a4cc runtime: fix arm build
TBR=golang-dev
CC=golang-dev
https://golang.org/cl/5832047
2012-03-15 17:40:17 -04:00
Russ Cox
7a84fb3a85 cmd/go: make build errors more visible
Fixes #3324.

Robert suggested not reporting errors until the end of the output.
which I'd also like to do, but errPrintedOutput makes that a bigger
change than I want to do before Go 1.  This change should at least
remove the confusion we had.

# Building packages and commands for linux/amd64.
runtime
errors
sync/atomic
unicode
unicode/utf8
math
sync
unicode/utf16
crypto/subtle
io
syscall
hash
crypto
crypto/md5
hash/crc32
crypto/cipher
crypto/hmac
crypto/sha1
go install unicode: copying /tmp/go-build816525784/unicode.a to /home/rsc/g/go/pkg/linux_amd64/unicode.a: short write
hash/adler32
container/list
container/ring
...

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5837054
2012-03-15 17:35:57 -04:00
Francisco Souza
9e03dcb3fa doc: add Gobs of data article
Originally published on The Go Programming Language Blog, March 24, 2011.

http://blog.golang.org/2011/03/gobs-of-data.html

R=adg
CC=golang-dev
https://golang.org/cl/5834043
2012-03-16 08:21:13 +11:00
Russ Cox
2ed7087c8d reflect: document PkgPath, Method, StructField
R=golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/5824053
2012-03-15 17:15:57 -04:00
Russ Cox
9e5db8c90a 5l, 6l, 8l: fix stack split logic for stacks near default segment size
Fixes #3310.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5823051
2012-03-15 15:22:30 -04:00
Russ Cox
b7b3652414 os: do not assume syscall.Write will write everything
Fixes #3323.

R=golang-dev, remyoudompheng, gri
CC=golang-dev
https://golang.org/cl/5837047
2012-03-15 15:10:19 -04:00
Russ Cox
20760e4335 go/build: do not report Target for local imports
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5820064
2012-03-15 15:08:57 -04:00
Brad Fitzpatrick
a4e6197b91 net/http: couple more triv.go modernizations
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5834049
2012-03-15 10:06:25 -07:00
Andrew Gerrand
d528f52d87 cmd/godoc: add toys, tour button to playground
Fixes #3241.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5835043
2012-03-15 17:44:47 +11:00
Alex Brainman
4b872d61fe os: return some invented data from Stat(DevNull) on windows
Fixes #3321.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5831043
2012-03-15 16:33:45 +11:00
Francisco Souza
235863cb12 doc: add "Godoc: documenting Go code" article
Originally published on The Go Programming Language Blog, March 31, 2011.

http://blog.golang.org/2011/03/godoc-documenting-go-code.html

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5830043
2012-03-15 14:51:44 +11:00
Robert Hencke
1c224ab9dd net/http: ensure triv.go compiles and runs
R=golang-dev, bradfitz, dsymonds, dave, r
CC=golang-dev
https://golang.org/cl/5795069
2012-03-14 20:25:57 -07:00
Andrew Gerrand
181dc14cd6 cmd/godoc: use *goroot as base path in zip file
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5781069
2012-03-15 11:31:16 +11:00
Brad Fitzpatrick
c959ebe4d8 archive/zip: move r.zip off disk, into reader_test.go
Makes certain virus scanners happier.

R=golang-dev, rsc, adg
CC=golang-dev
https://golang.org/cl/5823053
2012-03-14 14:41:06 -07:00
Robert Griesemer
036731c170 go/build: clearer argument name for Import (src -> srcDir)
R=rsc
CC=golang-dev
https://golang.org/cl/5820052
2012-03-14 13:19:14 -07:00
Russ Cox
95a8bab7b6 cmd/go: fix directory->import path conversion
Fixes #3306.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5821048
2012-03-14 15:12:57 -04:00
Russ Cox
70e58a2f9b io/ioutil: fix crash when Stat fails
Fixes #3320.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5824051
2012-03-14 14:47:13 -04:00
Shenghou Ma
b2a9079e54 runtime: manage stack by ourselves for badcallback on windows/amd64
This function uses 48-byte of precious non-split stack for every callback
function, and without this CL, it can easily overflow the non-split stack.
I encountered this when trying to enable misc/cgo/test on windows/amd64.

R=rsc
CC=golang-dev
https://golang.org/cl/5784075
2012-03-15 02:24:49 +08:00
Volker Dobler
1ddc9feb53 cmd/go: trivial help message fix for go help get
Direct reference to go help build where the flags are described.

R=golang-dev, adg, rsc
CC=golang-dev
https://golang.org/cl/5825046
2012-03-14 12:49:57 -04:00
Shenghou Ma
24ed667b33 os: IsNotExist() should also consider ERROR_PATH_NOT_FOUND on Windows
Also update documentation about IsExist() and IsNotExist(), they are not
    about files only.

R=rsc
CC=golang-dev
https://golang.org/cl/5794073
2012-03-14 23:54:40 +08:00
Rob Pike
214a1ca3c5 html/template: fix nil pointer bug
Fixes #3272.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5819046
2012-03-14 15:08:54 +11:00
Mikio Hara
9eeb90945e runtime/cgo: linux signal masking
Fixes #3314.
Fixes #3101 (again).

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5820047
2012-03-14 13:07:25 +09:00
Mikio Hara
1fc9a17c7e runtime/cgo: darwin signal masking
Fixes #3101 (again).

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5825043
2012-03-14 12:49:59 +09:00
Andrew Gerrand
ace7d26499 cmd/godoc: s/ignore/appengine/ in appinit.go +build constraint
R=golang-dev
CC=golang-dev
https://golang.org/cl/5784072
2012-03-14 14:02:59 +11:00
Andrew Gerrand
adcb508359 godoc: fix vet warnings for untagged struct literals
src/cmd/godoc/filesystem.go:337:10: os.PathError struct literal uses untagged fields
src/cmd/godoc/filesystem.go:355:10: os.PathError struct literal uses untagged fields

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5820046
2012-03-14 13:19:39 +11:00
Robert Griesemer
d724631a53 all: various typos
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5820045
2012-03-13 17:29:07 -07:00
Johan Euphrosine
fef92cbbac doc: add Go image/draw package article and convert code snippets to Go1.
Originally published on The Go Programming Language Blog, September 29, 2011.

http://blog.golang.org/2011/09/go-imagedraw-package.html

Update #2547.

R=golang-dev, adg, rsc
CC=golang-dev
https://golang.org/cl/5755057
2012-03-14 11:27:41 +11:00
Brad Fitzpatrick
5f32c8b88b html/template: fix panic on Clone
Fixes #3281

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5819044
2012-03-13 16:55:43 -07:00
Rob Pike
d6ad6f0e61 text/template: variables do not take arguments
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5821044
2012-03-14 10:46:21 +11:00
Robert Griesemer
b5021f3fe0 go/printer, gofmt: fix multi-line logic
A node spans multiple lines if the line difference
between start and end point is > 0 (rather than > 1).
Fixes some odd cases introduced by CL 5706055;
pointed out by dsymonds.

Added corresponding test case. The other change
in the .golden file reverts to the status before
the CL mentioned above and is correct.

gofmt -w src misc changes godoc.go back to where
it was before the CL mentioned above.

Fixes #3304.

R=dsymonds, rsc
CC=golang-dev
https://golang.org/cl/5820044
2012-03-13 16:15:58 -07:00
Shenghou Ma
62bb39e2ba fmt: remove dead code
Also fix a typo in comment.

R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/5808043
2012-03-14 04:59:17 +08:00
Rob Pike
8170d81f4f text/template: fix a couple of parse bugs around identifiers.
1) Poor error checking in variable declarations admitted
$x=2 or even $x%2.
2) Need white space or suitable termination character
after identifiers, so $x+2 doesn't parse, in case we want it
to mean something one day.
Number 2 in particular prevents mistakes that we will have
to honor later and so is necessary for Go 1.

Fixes #3270.
Fixes #3271.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5795073
2012-03-14 07:03:11 +11:00
Maxim Pimenov
5361712ab4 go/build: fix match
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5801043
2012-03-13 10:00:43 -04:00
Russ Cox
cc99d8ad0b gc: use quoted string format in import error
R=ken2
CC=golang-dev
https://golang.org/cl/5794077
2012-03-13 09:33:54 -04:00
Alex Brainman
f26b1f8056 make.bat: properly handle directories with spaces
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/5797079
2012-03-13 16:50:44 +11:00
Shenghou Ma
4ca59a010e os: remove document duplication in error predicate functions
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5783092
2012-03-13 13:48:07 +08:00
Rob Pike
d0a4c9bb62 gc: allow ~ in import paths
Windows has paths like C:/Users/ADMIN~1. Also, it so happens
that go/parser allows ~ in import paths. So does the spec.
Fixes the build too.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5777073
2012-03-13 16:03:19 +11:00
Rob Pike
daacba5184 gc: include full text of import path in error message
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5783091
2012-03-13 15:35:08 +11:00
Alex Brainman
16ade99d9d runtime: fix windows/amd64 exception handler
R=golang-dev, rsc
CC=golang-dev, hectorchu
https://golang.org/cl/5797077
2012-03-12 22:42:55 -04:00
Robert Hencke
4809ad655b cmd/go: fix typo
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5777072
2012-03-12 19:41:15 -07:00
David Symonds
fa6d3ab6be build: update comment about GO_LDFLAGS.
(5l/6l/8l aren't involved in building packages)

R=golang-dev, robert.hencke
CC=golang-dev
https://golang.org/cl/5798071
2012-03-13 12:52:15 +11:00
Alex Brainman
7c128493a4 test: actually run them on windows
R=golang-dev, r, rsc, bradfitz, minux.ma
CC=golang-dev
https://golang.org/cl/5756065
2012-03-13 12:51:28 +11:00
Shenghou Ma
0238cec021 os, syscall: windows really isn't posix compliant, fix os.IsExist()
R=golang-dev, rsc, bradfitz, alex.brainman
CC=golang-dev
https://golang.org/cl/5754083
2012-03-13 12:50:04 +11:00
Brad Fitzpatrick
d46438c3da cmd/godoc: remove sync code
Fixes #3273

R=gri
CC=golang-dev
https://golang.org/cl/5795065
2012-03-12 15:57:38 -07:00
Francisco Souza
bb6e685b7b godoc: fix codewalk handler
For URLs ending with /, the handler did not work, trying to append
".xml" to the path.

For instance, the "Share Memory by Communicating" returned the
following error:

        open /Users/francisco.souza/lib/go/doc/codewalk/sharemem/.xml: no such file or directory

R=adg, minux.ma
CC=golang-dev
https://golang.org/cl/5797065
2012-03-13 09:08:04 +11:00
Francisco Souza
60b98d6208 doc: add C? Go? Cgo! article
Originally published on The Go Programming Language Blog, March 17, 2011.

http://blog.golang.org/2011/03/c-go-cgo.html

Update #2547.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5777054
2012-03-13 09:07:37 +11:00
Fazlul Shahriar
c7cca2756e os/exec: fix typo in documentation
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5797073
2012-03-12 14:08:00 -07:00
Russ Cox
bf09a8c970 undo CL 5754088 / cae9a7c0db06
broke builders

««« original CL description
cmd/go: respect $GOBIN always

Before, we only consulted $GOBIN for source code
found in $GOROOT, but that's confusing to explain
and less useful.  The new behavior lets users set
GOBIN=$HOME/bin and have all go-compiled binaries
installed there.

Fixes #3269.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5754088
»»»

TBR=bradfitz
CC=golang-dev
https://golang.org/cl/5794065
2012-03-12 17:03:29 -04:00
Russ Cox
bccafa7210 cmd/go: respect $GOBIN always
Before, we only consulted $GOBIN for source code
found in $GOROOT, but that's confusing to explain
and less useful.  The new behavior lets users set
GOBIN=$HOME/bin and have all go-compiled binaries
installed there.

Fixes #3269.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5754088
2012-03-12 16:49:12 -04:00
Russ Cox
2d3cc97c9c runtime: fix windows/amd64
Maybe.

TBR=bradfitz
CC=golang-dev
https://golang.org/cl/5754091
2012-03-12 16:48:16 -04:00
Russ Cox
4e18bfb930 cmd/go: make go get new.code/... work
Fixes #2909.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5796072
2012-03-12 16:35:15 -04:00
Russ Cox
b70925d699 cmd/go: make net/... match net too
Otherwise there's no good way to get both, and it comes up often.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5794064
2012-03-12 16:34:24 -04:00
Russ Cox
0af08d8253 log: fix doc comment for Ldate
Fixes #3303.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5795062
2012-03-12 16:29:33 -04:00
Brad Fitzpatrick
a7c9f24907 cmd/fix: add rules for net/http -> net/http/httputil renames
And merge the httputil fix into go1rename.

R=golang-dev, r, dsymonds, r, rsc
CC=golang-dev
https://golang.org/cl/5696084
2012-03-12 13:25:48 -07:00
Brad Fitzpatrick
4edd53e47b os: document FileInfo.Size as system-dependent for irregular files
R=rsc, r
CC=golang-dev
https://golang.org/cl/5795059
2012-03-12 13:17:48 -07:00
Russ Cox
b23691148f runtime: print error on receipt of signal on non-Go thread
It's the best we can do before Go 1.

For issue 3250; not a fix but at least less mysterious.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5797068
2012-03-12 15:55:18 -04:00
Shenghou Ma
72801291d6 build: build correct cmd/dist matching GOHOSTARCH
Fix for issue 3210 comment #1.

R=adg, rsc
CC=golang-dev
https://golang.org/cl/5794057
2012-03-13 03:34:22 +08:00
Shenghou Ma
0359621241 build: update Makefile to track source code dependencies better
Also update .hgignore to ignore y.output.

R=rsc
CC=golang-dev
https://golang.org/cl/5797061
2012-03-13 03:31:11 +08:00
Shenghou Ma
d3191f5c2b gc: correct comment in runtime.go
R=rsc, iant
CC=golang-dev
https://golang.org/cl/5777057
2012-03-13 03:24:13 +08:00
Ingo Oeser
d13b24598f cmd/go: allow ssh tunnelled bzr, git and svn
This is often used in private hosting and collaborating environments.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5753063
2012-03-12 14:41:01 -04:00
Russ Cox
4084f08401 html/template: doc nit
Execute's data is untrusted regardless of package.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5797062
2012-03-12 14:26:10 -04:00
Brad Fitzpatrick
e8deb3f828 net/http: return appropriate errors from ReadRequest
Fixes #3298

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5783080
2012-03-12 10:42:25 -07:00
Russ Cox
da8efae9fe cmd/godoc: fix directory read
Undo CL 5783076 and apply correct fix.

The /doc hack is wrong.  The code to handle this case was
already there and just needs a simple fix:

 	// We didn't find any directories containing Go files.
 	// If some directory returned successfully, use that.
-	if len(all) == 0 && first != nil {
+	if !haveGo {
 		for _, d := range first {
 			haveName[d.Name()] = true
 			all = append(all, d)

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5783079
2012-03-12 13:10:37 -04:00
Russ Cox
376fc748f6 cmd/go: stop using $GOROOT and $GOBIN in script output
They were necessary to produce a canonical script
when we checked in build scripts, but now they're just
getting in the way.

Fixes #3279.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5796068
2012-03-12 12:39:31 -04:00
David Symonds
d75abb7ca3 archive/tar: catch short writes.
Also make error messages consistent throughout.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5777064
2012-03-12 17:33:35 +11:00
Andrew Gerrand
92d4af301e cmd/godoc: always include /doc files in union filesystems
Makes Path rewrites work, as the metadata was never being scanned.

Fixes #3282.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5783076
2012-03-12 15:55:39 +11:00
Robert Hencke
663a7716a1 crypto/tls, fmt: print fixes
R=golang-dev, bradfitz, minux.ma, rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5787069
2012-03-12 12:04:45 +09:00
David Symonds
2e1bc9e867 cmd/vet: little tweak to tagged literal script to get it closer to drop-in format.
This is a minor change that made it easier for me; if you hate it I can drop it.

R=nigeltao
CC=golang-dev
https://golang.org/cl/5798060
2012-03-12 13:50:25 +11:00
Brad Fitzpatrick
e31fa68a43 cmd/api: work on Windows again, and make gccgo files work a bit more
handle string and []byte conversions.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5754082
2012-03-11 17:55:15 -07:00
David Symonds
764880e2b2 cmd/api: set compiler for all build contexts.
The generated syscall files for Windows are still breaking "go tool api"
(unknown function []byte); I'll look at fixing that separately.

Fixes #3285.

R=bradfitz
CC=golang-dev
https://golang.org/cl/5777062
2012-03-12 11:25:38 +11:00
Russ Cox
cd7ae05d52 cmd/go: local import fixes
1) The -D argument should always be a pseudo-import path,
like _/Users/rsc/foo/bar, never a standard import path,
because we want local imports to always resolve to pseudo-paths.

2) Disallow local imports in non-local packages.  Otherwise
everything works but you get two copies of a package
(the real one and the "local" one) in your binary.

R=golang-dev, bradfitz, yiyu.jgl
CC=golang-dev
https://golang.org/cl/5787055
2012-03-11 15:53:42 -04:00
Gwenael Treguier
c3954dd5da database/sql: ensure Stmts are correctly closed.
To make sure that there is no resource leak,
I suggest to fix the 'fakedb' driver such as it fails when any
Stmt is not closed.
First, add a check in fakeConn.Close().
Then, fix all missing Stmt.Close()/Rows.Close().
I am not sure that the strategy choose in fakeConn.Prepare/prepare* is ok.
The weak point in this patch is the change in Tx.Query:
  - Tests pass without this change,
  - I found it by manually analyzing the code,
  - I just try to make Tx.Query look like DB.Query.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5759050
2012-03-10 15:21:44 -08:00
Brad Fitzpatrick
3297fc63d6 database/sql: fix double connection free on Stmt.Query error
In a transaction, on a Stmt.Query error, it was possible for a
connection to be added to a db's freelist twice. Should use
the local releaseConn function instead.

Thanks to Gwenael Treguier for the failing test.

Also in this CL: propagate driver errors through releaseConn
into *DB.putConn, which conditionally ignores the freelist
addition if the driver signaled ErrBadConn, introduced in a
previous CL.

R=golang-dev, gary.burd
CC=golang-dev
https://golang.org/cl/5798049
2012-03-10 10:00:02 -08:00
David Symonds
81a38fbb77 net/mail: close minor TODO that was waiting on a 6g bug fix.
R=golang-dev, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5796050
2012-03-10 19:02:52 +11:00
Brad Fitzpatrick
b2e9f425b9 net/http: fix crash with Transport.CloseIdleConnections
Thanks Michael Lore for the bug report!

Fixes #3266

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5754068
2012-03-09 16:27:32 -08:00
Brad Fitzpatrick
98cfe6770d archive/zip: verify CRC32s in non-streamed files
We should check the CRC32s of files on EOF, even if there's no
data descriptor (in streamed files), as long as there's a non-zero
CRC32 in the file header / TOC.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5794045
2012-03-09 14:45:40 -08:00
Alex Brainman
9fffe45c65 crypto/x509: do not forget to free cert context
R=golang-dev, krautz, rsc
CC=golang-dev
https://golang.org/cl/5783059
2012-03-10 09:35:56 +11:00
Brad Fitzpatrick
3cea4131df archive/zip: write data descriptor signature for OS X; fix bugs reading it
We now always write the "optional" streaming data descriptor
signature, which turns out to be required for OS X.

Also, handle reading the data descriptor with or without the
signature, per the spec's recommendation. Fix data descriptor
reading bugs found in the process.

Fixes #3252

R=golang-dev, alex.brainman, nigeltao, rsc
CC=golang-dev
https://golang.org/cl/5787062
2012-03-09 14:12:02 -08:00
Robert Griesemer
ece0d0e7d2 go/printer: example for Fprint
R=golang-dev, dsymonds, rsc
CC=golang-dev
https://golang.org/cl/5785057
2012-03-09 13:53:25 -08:00
Shenghou Ma
29199aa4e4 cmd/gc: import path cannot start with slash on Windows
For CL 5756065.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5784065
2012-03-10 05:11:51 +08:00
Shenghou Ma
6d4da06d36 cmd/dist, cmd/go: move CGO_ENABLED from 'go tool dist env' to 'go env'
So that we don't duplicate knowledge about which OS/ARCH combination
        supports cgo.
        Also updated src/run.bash and src/sudo.bash to use 'go env'.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5792055
2012-03-10 03:42:23 +08:00
Jeremy Jackins
1e374502f4 cmd/vet: fix typo in documentation
familiy -> family

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5783061
2012-03-09 11:21:01 -08:00
Robert Griesemer
49d2d98697 go/printer, gofmt: nicer formatting of multi-line returns
This affects corner (test) cases only; gofmt -w src misc
doesn't cause any changes.

- added additional test cases
- removed doIndent parameter from printer.valueSpec
  (was always false)
- gofmt -w src misc causes no changes

Fixes #1207.

R=dsymonds, rsc
CC=golang-dev
https://golang.org/cl/5786060
2012-03-09 11:05:50 -08:00
Russ Cox
c9e5600f7d runtime: move runtime.write back to C
It may have to switch stacks, since we are calling
a DLL instead of a system call.

badcallback says where it is, because it is being called
on a Windows stack already.

R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/5782060
2012-03-09 00:10:34 -05:00
Mikio Hara
26fa1c8248 net: fix typo
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5782063
2012-03-09 11:50:38 +09:00
Russ Cox
6a19ae74d4 go/build: add NoGoError
R=dsymonds
CC=golang-dev
https://golang.org/cl/5781063
2012-03-08 17:30:45 -05:00
Russ Cox
8a1b3d5a57 runtime: fix windows build
Implement runtime·write, like on the other systems,
and also runtime·badcallback, in assembly to reduce
stack footprint.

TBR=golang-dev
CC=golang-dev
https://golang.org/cl/5785055
2012-03-08 15:53:11 -05:00
Brad Fitzpatrick
312ff5b58e cmd/go: document import path meta tag discovery in go help remote
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5787059
2012-03-08 11:31:52 -08:00
Russ Cox
2c46569f57 cmd/go: add env command, use to fix misc/cgo/testso
Fixes 386 build on 64-bit machines.

R=golang-dev, bradfitz, minux.ma
CC=golang-dev
https://golang.org/cl/5785053
2012-03-08 14:28:44 -05:00
Russ Cox
36aa7d4d14 runtime: inline calls to notok
When a very low-level system call that should never fail
does fail, we call notok, which crashes the program.
Often, we are then left with only the program counter as
information about the crash, and it is in notok.
Instead, inline calls to notok (it is just one instruction
on most systems) so that the program counter will
tell us which system call is unhappy.

R=golang-dev, gri, minux.ma, bradfitz
CC=golang-dev
https://golang.org/cl/5792048
2012-03-08 14:03:56 -05:00
Robert Griesemer
56cae1c230 all: gofmt -w -s src misc
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5781058
2012-03-08 10:48:51 -08:00
Brad Fitzpatrick
9fb68a9a0a database/sql{,driver}: add ErrBadConn
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5785043
2012-03-08 10:09:52 -08:00
Shenghou Ma
736ff448de doc: various update to command documents
1. consistent usage section (go tool xxx)
        2. reformat cmd/ld document with minor correction
           document which -H flags are valid on which ld
           document -d flag can't be used on Windows.
           document -Hwindowsgui

R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/5782043
2012-03-09 01:31:09 +08:00
Francisco Souza
dc57ed8caf misc/cgo: re-enable testso
The test.bash file generates .so file using gcc, builds the executable
using the go tool and then run it with the $LD_LIBRARY_PATH variable
pointing to the directory where the .so file lives.

Fixes #2982.

R=rsc, remyoudompheng
CC=golang-dev
https://golang.org/cl/5788043
2012-03-08 12:13:41 -05:00
Russ Cox
9b73238daa cgo, runtime: diagnose callback on non-Go thread
Before:
$ go run x.go
signal 11 (core dumped)
$

After:
$ go run x.go
runtime: cgo callback on thread not created by Go.
signal 11 (core dumped)
$

For issue 3068.
Not a fix, but as much of a fix as we can do before Go 1.

R=golang-dev, rogpeppe, gri
CC=golang-dev
https://golang.org/cl/5781047
2012-03-08 12:12:40 -05:00
Robert Griesemer
9b7b574edc go/parser: use test harness for short tests
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5782044
2012-03-08 08:53:31 -08:00
Mikkel Krautz
3133b14b30 crypto/x509: allow server gated crypto in windows systemVerify
Also factors out some code into functions to make
systemVerify easier to read.

R=rsc, agl
CC=golang-dev
https://golang.org/cl/5781054
2012-03-08 11:28:04 -05:00
Mikio Hara
dfb1af4b97 cmd/gofmt: fix race in long test
Fixes #3249.

R=rsc
CC=golang-dev
https://golang.org/cl/5792043
2012-03-08 23:56:26 +09:00
Russ Cox
a40065ac68 cmd/godoc: add support for serving templates
doc: convert to use godoc built-in templates

tmpltohtml is gone, to avoid having a second copy of the code.
Instead, godoc -url /doc/go1.html will print the actual HTML
served for that URL.  "make" will generate files named go1.rawhtml
etc, which can be fed through tidy.

It can be hard to tell from the codereview diffs, but all the
tmpl files have been renamed to be html files and then
have "Template": true added.

R=golang-dev, adg, r, gri
CC=golang-dev
https://golang.org/cl/5782046
2012-03-08 08:39:20 -05:00
Russ Cox
e38c5fb23d net: document ReadMsgUnix, WriteMsgUnix
Fixes #3247.

R=golang-dev, jsing
CC=golang-dev
https://golang.org/cl/5784051
2012-03-08 08:36:40 -05:00
Russ Cox
2ee538bc27 time: mention receiver in Unix, UnixNano docs
Fixes #3248.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5784052
2012-03-08 08:32:52 -05:00
Russ Cox
2b64e00f16 cmd/go: rebuild external test package dependencies
Was missing recompilation of packages imported only
by external test packages (package foo_test), primarily
because Root was not set, so those packages looked like
they were from a different Go tree, so they were not
recompiled if they already existed.

Also clean things up so that only one call to computeStale
is needed.

Fixes #3238.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5786048
2012-03-08 08:32:38 -05:00
Volker Dobler
d7d1b18a5d fmt: minor tweak of package doc to show headings in godoc
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5781052
2012-03-08 22:22:36 +11:00
Alex Brainman
2b8a7adde8 go/build: do not parse .syso files
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5786049
2012-03-08 17:06:53 +11:00
Robert Griesemer
f3c39d8f2b go/parser: avoid endless loop in case of internal error
Factored the error synchronization code into two functions
syncStmt and syncDecl. Because they may return w/o advancing
the scanner, there is potential for endless loops across
multiple parse functions; typically caused by an incorrect
token list in these functions (e.g., adding token.ELSE to
syncStmt will cause the parser to go into an endless loop
for test/syntax/semi7.go without this mechanism). This would
indicate a compiler bug, exposed only in an error situation
for very specific source files. Added a mechanism to force
scanner advance if an endless loop is detected. As a result,
error recovery will be less good in those cases, but the parser
reported a source error already and at least doesn't get stuck.

R=rsc, rsc
CC=golang-dev
https://golang.org/cl/5784046
2012-03-07 21:28:50 -08:00
Russ Cox
d4fb568e04 cmd/gc: implement len(array) / cap(array) rule
The spec is looser than the current implementation.
The spec edit was made in CL 4444050 (May 2011)
but I never implemented it.

Fixes #3244.

R=ken2
CC=golang-dev
https://golang.org/cl/5785049
2012-03-07 22:43:28 -05:00
Russ Cox
43d71e7d7d cmd/cgo: silence const warnings
Fixes #3152.

R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/5786047
2012-03-07 22:40:32 -05:00
Shenghou Ma
d56e0e7e94 doc: fix freebsd build
Also rename it to test.bash, for naming consistency.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5784045
2012-03-08 12:04:49 +09:00
Russ Cox
9069721b0e cmd/gc: delete old map delete in walk
R=ken2
CC=golang-dev
https://golang.org/cl/5783047
2012-03-07 22:03:35 -05:00
Russ Cox
b0996334c1 go/build, cmd/go: add support for .syso files
.syso files are system objects copied directly
into the package archive.

Fixes #1552.

R=alex.brainman, iant, r, minux.ma, remyoudompheng
CC=golang-dev
https://golang.org/cl/5778043
2012-03-07 22:03:18 -05:00
Francisco Souza
686d699ec6 io: minor change in io.WriteAt docs.
R=adg, bradfitz
CC=golang-dev
https://golang.org/cl/5787048
2012-03-08 12:49:13 +11:00
Robert Griesemer
5827dd052c go/scanner: better panic diagnostic
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5787045
2012-03-07 16:57:26 -08:00
Alex Brainman
0029b0d207 path/filepath: retrieve real file name in windows EvalSymlinks
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5756049
2012-03-08 10:00:25 +11:00
Shenghou Ma
90010f8f63 build: re-enable some broken tests in run.bash
Updates #2982.

R=rsc, rsc
CC=golang-dev
https://golang.org/cl/5759064
2012-03-08 06:23:56 +08:00
Rémy Oudompheng
5c4d6ebb11 cmd/go: support -compiler for go list, fix isStale for gccgo.
Fixes #3228.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5784044
2012-03-07 23:15:55 +01:00
Dmitriy Vyukov
c8b1f85493 encoding/gob: fix memory corruption
Fixes #3175.

R=golang-dev, iant, rsc, r
CC=golang-dev
https://golang.org/cl/5758069
2012-03-08 08:53:08 +11:00
Russ Cox
b0beeb1501 runtime: fix freebsd crash
FreeBSD, alone among our supported operating systems,
required that usleep not be interrupted.  Don't require that.

Fixes #3217.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5781045
2012-03-07 15:30:54 -05:00
Robert Griesemer
c8981c718b go/parser: better error synchronization
gofmt reports now a single, accurate error for
the test case of issue 3106.

Also: Added test harness for general error
checking and two test cases for now.

Fixes #3106.

R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5755062
2012-03-07 12:24:20 -08:00
Russ Cox
babbf941c9 net, net/rpc, reflect, time: document concurrency guarantees
Fixes #1599.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5777043
2012-03-07 14:55:09 -05:00
Russ Cox
291636b99b testing: do not print 'no tests' when there are examples
I am not sure why RunTests and RunExamples are
exported, but I assume that because they are we
should not change the signature, so I added an
unexported global shared by Main and RunTests.

Fixes #3237.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5779043
2012-03-07 14:54:31 -05:00
Rémy Oudompheng
3dcedb620c runtime: try extending arena size in 32-bit allocator.
If it didn't reach the limit, we can try extending the arena
before resorting to random memory mappings and praying for the
kernel to be kind.

Fixes #3173.

R=rsc, rsc
CC=golang-dev
https://golang.org/cl/5725045
2012-03-07 14:21:45 -05:00
Brad Fitzpatrick
0210f4137b io: more docs on WriterAt
Updates #1599

R=golang-dev, gri, rsc
CC=golang-dev
https://golang.org/cl/5774043
2012-03-07 10:54:04 -08:00
Mikkel Krautz
4aab8806e7 deps: allow crypto/x509 to use syscall
Allows the Windows part of CL 5700087 to land.

I had build tested CL 5753060 (which allows
crypto/x509 to use cgo and io/ioutil), and
didn't spot any errors on Windows.

Turns out I was wrong.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5753065
2012-03-07 13:51:05 -05:00
Robert Griesemer
9e8e4a9313 go/parser: better error sync. if commas are missing
This time for sure.
Runs all tests.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5752060
2012-03-07 10:19:32 -08:00
Robert Griesemer
3a065c5a73 godoc: update documentation
R=rsc
CC=golang-dev
https://golang.org/cl/5758057
2012-03-07 10:19:16 -08:00
Mikkel Krautz
a324a5ac20 crypto/x509: new home for root fetchers; build chains using Windows API
This moves the various CA root fetchers from crypto/tls into crypto/x509.

The move was brought about by issue 2997. Windows doesn't ship with all
its root certificates, but will instead download them as-needed when using
CryptoAPI for certificate verification.

This CL changes crypto/x509 to verify a certificate using the system root
CAs when VerifyOptions.RootCAs == nil. On Windows, this verification is
now implemented using Windows's CryptoAPI. All other root fetchers are
unchanged, and still use Go's own verification code.

The CL also fixes the hostname matching logic in crypto/tls/tls.go, in
order to be able to test whether hostname mismatches are honored by the
Windows verification code.

The move to crypto/x509 also allows other packages to use the OS-provided
root certificates, instead of hiding them inside the crypto/tls package.

Fixes #2997.

R=agl, golang-dev, alex.brainman, rsc, mikkel
CC=golang-dev
https://golang.org/cl/5700087
2012-03-07 13:12:35 -05:00
Russ Cox
807aadcd3e cmd/go: fix go test -compiler
The compiler must be changed with the Set method
so that the buildToolchain gets updated too.

Fixes #3231.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5768044
2012-03-07 12:09:43 -05:00
Russ Cox
a385f38dfa net: delete usableLocalPort from test
The old way to find a port was to listen :0 and then
look at what port it picked, close the listener, and then
immediately try to listen on that port.

On some Windows 7 machines that sequence fails at
the second listen, because the first one is still lingering
in the TCP/IP stack somewhere.  (Ironically, most of these
are used in tests of a "second listen", which in this case
ends up being the third listen.)

Instead of this race, just return the listener from the
function, replacing usableLocalPort+Listen with
usableListenPort.

Fixes #3219.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5769045
2012-03-07 12:06:22 -05:00
Russ Cox
b37841cc06 runtime/pprof: disable test on Leopard 64-bit
Fixes #3234.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5756078
2012-03-07 11:44:54 -05:00
Russ Cox
f4b40d92c8 cmd/cgo: document CGO_LDFLAGS and CGO_CFLAGS
Fixes #3203.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5769043
2012-03-07 11:44:47 -05:00
Russ Cox
318465b52a make.bash: fix old builds
Fixes #3222.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5761044
2012-03-07 11:38:05 -05:00
Russ Cox
afb1b0e6b7 undo CL 5754063 / e23b66fcfc94
Does not actually test so files.

««« original CL description
misc/cgo: re-enable testso

Also enabled it for darwin.

R=rsc
CC=golang-dev
https://golang.org/cl/5754063

»»»

R=golang-dev, minux.ma, r, f
CC=golang-dev
https://golang.org/cl/5756075
2012-03-07 10:15:20 -05:00
Mikio Hara
ae7a843471 net: use IANA reserved port to test dial timeout
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5757060
2012-03-07 16:28:40 +09:00
Russ Cox
4267974c0b cmd/gc: unnamed struct types can have methods
Fixes #3143.

R=ken2
CC=golang-dev
https://golang.org/cl/5752070
2012-03-07 02:27:15 -05:00
Russ Cox
987a580b9f cmd/gc: do not confuse unexported methods of same name
Fixes #3146.

R=ken2
CC=golang-dev
https://golang.org/cl/5756074
2012-03-07 01:55:17 -05:00
Alex Brainman
5aee1f3a0f exp/wingui: getting relocated to
go get code.google.com/p/gowingui

R=golang-dev, minux.ma, r
CC=golang-dev
https://golang.org/cl/5752067
2012-03-07 17:48:09 +11:00
Shenghou Ma
6a426169f5 cmd/go: always provide .exe suffix on windows
Fixes #3190.

R=rsc, tjyang2001, rsc
CC=golang-dev
https://golang.org/cl/5759056
2012-03-07 14:25:24 +08:00
Shenghou Ma
c086bc1d7d cmd/dist: fix build for Linux/ARM
find() returns -1 when not found.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5752068
2012-03-07 14:24:28 +08:00
Mikio Hara
e2b207bc4f sync/atomic: disable store and load test on a single processor machine
Fixes #3226.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5756073
2012-03-07 14:51:20 +09:00
Russ Cox
c804efb5de net: fix TestDialTimeout on windows builder
I don't know what's out there, but something
is answering to 127.0.71.111:80 on our builder,
so use a different port.

Also insert a check that the dial fails, which
would have diagnosed this problem.

Fixes #3016.

R=golang-dev, mikioh.mikioh, r
CC=golang-dev
https://golang.org/cl/5754062
2012-03-07 00:41:24 -05:00
Francisco Souza
152a1aa610 misc/cgo: re-enable testso
Also enabled it for darwin.

R=rsc
CC=golang-dev
https://golang.org/cl/5754063
2012-03-07 00:40:16 -05:00
Russ Cox
c10650979f net: disable another external network test
I don't know enough about multicast.
Should this be disabled on all systems, not just Windows?

R=golang-dev
CC=golang-dev
https://golang.org/cl/5754060
2012-03-07 00:02:07 -05:00
Russ Cox
85ae6a18b5 cmd/go: fix run errors
$ go run
go run: no go files listed
$ go run ../../pkg/math/bits.go
go run: cannot run non-main package
$

Fixes #3168.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5755064
2012-03-07 00:01:57 -05:00
Shenghou Ma
881966d2a5 cmd/go, cmd/godoc, net: fix typo
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5757050
2012-03-07 12:41:43 +08:00
Russ Cox
7c7966a426 net: disable use of external listen along with other external network uses
By default the all.bash tests must not ever announce
on an external address.  It's not just an OS X issue.

R=golang-dev, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5753067
2012-03-06 23:35:31 -05:00
Russ Cox
c3f4319a24 misc/cgo: re-enable some tests
The testso directory still needs to be enabled.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5731048
2012-03-06 23:27:30 -05:00
Russ Cox
0bc18811b5 fmt, log: stop using unicode
$ go list -f '{{.ImportPath}} {{.Deps}}' fmt log
fmt [errors io math os reflect runtime strconv sync sync/atomic syscall time unicode/utf8 unsafe]
log [errors fmt io math os reflect runtime strconv sync sync/atomic syscall time unicode/utf8 unsafe]

R=bradfitz, rogpeppe, r, r, rsc
CC=golang-dev
https://golang.org/cl/5753055
2012-03-06 23:27:11 -05:00
Rob Pike
8f61631c74 go/build: delete Makefile
We can write syslist.go by hand.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5757057
2012-03-07 14:10:49 +11:00
Rob Pike
544a72cc86 exp/wingui: remove reference to Make.inc
R=golang-dev, bradfitz, alex.brainman
CC=golang-dev
https://golang.org/cl/5757058
2012-03-07 14:06:16 +11:00
Rob Pike
905cb4881b all: remove some references to Make.inc etc.
There are a few more but these are the easiest ones.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5756067
2012-03-07 13:51:49 +11:00
Rob Pike
f91326b7b1 strconv: remove dependence on unicode and strings
We need a compact, reasonably efficient IsPrint. That adds about 2K of data,
plus a modest amount of code, but now strconv is a near-leaf package.

R=r, bradfitz, adg, rsc, minux.ma
CC=golang-dev
https://golang.org/cl/5756050
2012-03-07 13:50:31 +11:00
Brad Fitzpatrick
502e29f485 database/sql: add docs about connection state, pooling
Fixes #3223

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5755063
2012-03-06 17:44:47 -08:00
Alex Brainman
7a3c6c950b os: fix SameFile to work for directories on windows
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5756064
2012-03-07 11:01:23 +11:00
Adam Langley
3ea3a7c9a5 deps: allow crypto/x509 cgo and io/ioutil.
In order to land 5700087 (which moves the knowledge of how to get the
root certificates for the system from crypto/tls to crypto/x509), we
need to relax the restrictions on crypto/x509. Afterwards, we can
probably tighten them up in crypto/tls.

R=golang-dev, rsc, krautz
CC=golang-dev
https://golang.org/cl/5753060
2012-03-06 17:18:09 -05:00
Brad Fitzpatrick
48eacd90a8 database/sql: fix typo bug resulting in double-Prepare
Bug reported by Blake Mizerany found while writing
his new Postgres driver.

R=golang-dev, blake.mizerany
CC=golang-dev
https://golang.org/cl/5754057
2012-03-06 14:10:58 -08:00
Rob Pike
aeefe0fa6e path/filepath: disable AbsTest on windows
SameFile has a bug.

R=golang-dev
TBR=rsc
CC=golang-dev
https://golang.org/cl/5754055
2012-03-07 08:14:12 +11:00
Rob Pike
2184137cf3 path/filepath/path_test.go: repair and enable TestAbs
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5759051
2012-03-07 07:54:56 +11:00
Robert Griesemer
39b186da6c go/parser: fix build (temporarily disable recent change)
R=golang-dev
CC=golang-dev
https://golang.org/cl/5752059
2012-03-06 11:23:27 -08:00
Robert Griesemer
67cbe9431f go/parser: better error sync. if commas are missing
R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5756045
2012-03-06 11:05:16 -08:00
Adam Langley
4f25e4be02 crypto/tls: make the package description more accurate and less aspirational.
Fixes #3216.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5755056
2012-03-06 12:49:29 -05:00
Shenghou Ma
db80edde7d time: during short test, do not bother tickers take longer than expected
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5752058
2012-03-07 01:10:55 +08:00
Ian Lance Taylor
aabbcda816 runtime: remove unused runtime·signame and runtime·newError
R=golang-dev
CC=golang-dev
https://golang.org/cl/5756044
2012-03-06 09:07:00 -08:00
Maxim Pimenov
eb2163ffbb cmd/go: honour buildflags in go run
Either documentation or implementation
of go run's flags is wrong currently.
This change assumes the documentation
to be right.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5752054
2012-03-06 09:33:35 -05:00
Rémy Oudompheng
9eda2b9977 net: do not use reflect for DNS messages.
Fixes #3201.

R=bradfitz, bradfitz, rsc
CC=golang-dev, remy
https://golang.org/cl/5753045
2012-03-06 08:02:39 +01:00
Mikio Hara
9442c4429a net: add skip message to test
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5753048
2012-03-06 15:41:17 +09:00
Brad Fitzpatrick
932c8ddba1 cmd/go: allow go get with arbitrary URLs
This CL permits using arbitrary, non-VCS-qualified URLs as
aliases for fully VCS-qualified and/or well-known code hosting
sites.

Example 1) A VCS-qualified URL can now be shorter.

Before:
$ go get camlistore.org/r/p/camlistore.git/pkg/blobref
After:
$ go get camlistore.org/pkg/blobref

Example 2) A custom domain can be used as the import,
referencing a well-known code hosting site.

Before:
$ go get github.com/bradfitz/sonden
After:
$ go get bradfitz.com/pkg/sonden

The mechanism used is a <meta> tag in the HTML document
retrieved from fetching:

    https://<import>?go-get=1  (preferred)
    http://<import>?go-get=1   (fallback)

The meta tag should look like:

<meta name="go-import" content="import-alias-prefix vcs full-repo-root">

The full-repo-root must be a full URL root to a repository containing
a scheme and *not* containing a ".vcs" qualifier.

The vcs is one of "git", "hg", "svn", etc.

The import-alias-prefix must be a prefix or exact match of the
package being fetched with "go get".

If there are multiple meta tags, only the one with a prefix
matching the import path is used. It is an error if multiple
go-import values match the import prefix.

If the import-alias-prefix is not an exact match for the import,
another HTTP fetch is performed, at the declared root (which does
*not* need to be the domain's root).

For example, assuming that "camlistore.org/pkg/blobref" declares
in its HTML head:

<meta name="go-import" content="camlistore.org git https://camlistore.org/r/p/camlistore" />

... then:

$ go get camlistore.org/pkg/blobref

... looks at the following URLs:

   https://camlistore.org/pkg/blobref?go-get=1
   http://camlistore.org/pkg/blobref?go-get=1
   https://camlistore.org/?go-get=1
   http://camlistore.org/?go-get=1

Ultimately it finds, at the root (camlistore.org/), the same go-import:

<meta name="go-import" content="camlistore.org git https://camlistore.org/r/p/camlistore" />

... and proceeds to trust it, checking out git //camlistore.org/r/p/camlistore at
the import path of "camlistore.org" on disk.

Fixes #3099

R=r, rsc, gary.burd, eikeon, untheoretic, n13m3y3r, rsc
CC=golang-dev
https://golang.org/cl/5660051
2012-03-05 22:36:15 -08:00
Alex Brainman
36708a40e0 cmd/dist: use correct hg tag for go version
When looking for suitable tag always start
from current version, not the tip.

R=minux.ma, rsc
CC=golang-dev
https://golang.org/cl/5731059
2012-03-06 17:21:39 +11:00
Russ Cox
347cc981f0 cmd/go: add -compiler
go/build: add Context.Compiler

Fixes #3157.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5756047
2012-03-06 00:36:24 -05:00
Russ Cox
e9d5a641d7 strconv: add table-based isPrint
Not used yet for simpler merge.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5756048
2012-03-06 00:36:12 -05:00
Brad Fitzpatrick
9ff00c8fc9 go/build: fix windows and plan9 builds
Bit of a band-aid fix.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5757045
2012-03-05 21:33:44 -08:00
Rob Pike
eab4261946 strconv: remove dependency on bytes
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5759044
2012-03-06 15:25:42 +11:00
Russ Cox
88e86936be go/build: add dependency test
This exercises the Import function but more importantly
gives us a place to write down the policy for dependencies
within the Go tree.  It also forces us to look at the dependencies,
which may lead to adjustments.

Surprises:
 - go/doc imports text/template, for HTMLEscape (could fix)
 - it is impossible to use math/big without fmt (unfixable)
 - it is impossible to use crypto/rand without math/big (unfixable)

R=golang-dev, bradfitz, gri, r
CC=golang-dev
https://golang.org/cl/5732062
2012-03-05 23:13:00 -05:00
Rob Pike
98c1baff6f unicode/utf16: delete dependence on package unicode
In the test, verify the copied constants are correct.
Also put the test into package utf16 rather than utf16_test;
the old location was probably due creating the test from
utf8, but the separation is not needed here.

R=golang-dev, bradfitz, rsc, rsc, r
CC=golang-dev
https://golang.org/cl/5752047
2012-03-06 14:58:08 +11:00
Russ Cox
866317af5e cmd/godoc: fixes
These appear to have been left out of the CL I submitted earlier.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5759043
2012-03-05 22:47:35 -05:00
Russ Cox
5e41fe0e45 build: use run.go for running tests
Also, tweak run.go to use no more than 2x the
number of CPUs, and only one on ARM.

53.85u 13.33s 53.69r 	 ./run
50.68u 12.13s 18.85r 	 go run run.go

Fixes #2833.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5754047
2012-03-05 22:47:23 -05:00
Russ Cox
4e110af169 runtime: add Compiler
R=iant, r, gri
CC=golang-dev
https://golang.org/cl/5720073
2012-03-05 22:28:02 -05:00
Russ Cox
0a6fdcf63b net: silence another epoll print
R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/5752048
2012-03-05 22:07:22 -05:00
Mikio Hara
195ccd5dac net: fix windows build
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5755045
2012-03-06 10:07:08 +09:00
Mikio Hara
d4e1383285 net: improve server and file tests
* Splits into three server tests.
  - TestStreamConnServer for tcp, tcp4, tcp6 and unix networks
  - TestSeqpacketConnServer for unixpacket networks
  - TestDatagramPacketConnServer for udp, udp4, udp6 and unixgram networks
* Adds both PacketConn and Conn test clients to datagram packet conn tests.
* Fixes wildcard listen test cases on dual IP stack platform.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5701066
2012-03-06 09:43:45 +09:00
Rob Pike
d9832987ba unicode/utf8: remove dependence on unicode.
The dependency was there only to pull in two constants.
Now we define them locally and verify equality in the test.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5754046
2012-03-06 11:14:45 +11:00
Ian Lance Taylor
46031400d0 reflect: fix comment spacing
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5757043
2012-03-05 15:51:58 -08:00
David Symonds
63e383cff8 expvar: add locking to String, and use RWMutex properly throughout.
R=bradfitz
CC=golang-dev
https://golang.org/cl/5754043
2012-03-06 09:13:26 +11:00
Rémy Oudompheng
aa1aaee7fd runtime: wait for main goroutine before setting GOMAXPROCS.
Fixes #3182.

R=golang-dev, dvyukov, rsc
CC=golang-dev, remy
https://golang.org/cl/5732057
2012-03-05 16:40:27 -05:00
Brad Fitzpatrick
610b5b2fd8 net: remove all direct fmt and bytes imports
Once dnsMsg stops using reflect, we lose even more
indirect dependencies.

R=rsc
CC=golang-dev
https://golang.org/cl/5751043
2012-03-05 13:36:05 -08:00