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

9346 Commits

Author SHA1 Message Date
Alex Brainman
d1bd332a67 os: sleep 5ms after process has exited on windows
Fixes #2866.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5719047
2012-03-02 16:35:42 +11:00
Alex Brainman
c3fbc9a5e8 os: implement UserTime/SystemTime on windows
Fixes #3145.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5721044
2012-03-02 14:47:40 +11:00
Rob Pike
36d9ee4aec os: fix grammar in ProcessState comment
Asymptotic convergence.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5719045
2012-03-02 14:07:26 +11:00
Russ Cox
30db6d41cd os: centralize documentation of Process and ProcessState
Also change Wait to say "exit" instead of "exit or stop".

I notice that Pid is not implemented on all systems.
Should we fix that?

Fixes #3138.

R=golang-dev, alex.brainman, r
CC=golang-dev
https://golang.org/cl/5710056
2012-03-01 21:56:54 -05:00
Russ Cox
d49475e078 go/build: fix build
Presumably something about the very large go/build
doc comment breaks the build constraint parser in
cmd/dist.  I don't feel like debugging C code right now,
so move it into its own file.  If cmd/dist decides doc.go
is not part of the package, it will still build correctly.

R=golang-dev
TBR=golang-dev
CC=golang-dev
https://golang.org/cl/5722043
2012-03-01 19:42:39 -05:00
Russ Cox
9316070419 go/build: document GOPATH
Fixes #2332.

R=golang-dev, remyoudompheng, gri, r, r
CC=golang-dev
https://golang.org/cl/5710055
2012-03-01 18:26:53 -05:00
Gustavo Niemeyer
e8c970e5f7 cmd/go: fix verbose command displaying
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5715050
2012-03-01 20:14:21 -03:00
Gustavo Niemeyer
04450d8a26 cmd/go: fix -I flag for gc command
R=rsc, remyoudompheng
CC=golang-dev
https://golang.org/cl/5711056
2012-03-01 20:13:04 -03:00
Robert Griesemer
7c6654aa70 all: fixed various typos
(Semi-automatically detected.)

R=golang-dev, remyoudompheng, r
CC=golang-dev
https://golang.org/cl/5715052
2012-03-01 14:56:05 -08:00
Russ Cox
af95499619 reflect: expand doc for Value.Interface
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5716057
2012-03-01 17:55:47 -05:00
Russ Cox
3c3c5f38a0 cmd/dist: Unix grammar fix
Fixes #3165.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5712051
2012-03-01 13:38:05 -05:00
Gustavo Niemeyer
b5d4cffd15 encoding/xml: fix xml test tag usage
No real problem.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5717049
2012-03-01 15:20:13 -03:00
Dmitriy Vyukov
2295554db6 sync: add Once example
R=golang-dev, rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5715046
2012-03-01 22:16:20 +04:00
Dmitriy Vyukov
986df83e0d sync: remove old WaitGroup example
The docs look awkward - there is a paragraph
"For example:" with a plain text example,
and straight below it a real Example.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5717048
2012-03-01 21:26:08 +04:00
Russ Cox
b03a5f66e8 cmd/go: fixes
* Install tools into tool dir always
  (Fixes issue 3049.  Fixes issue 2868.  Fixes issue 2925.)
* Make packages depend on compiler, linker (Fixes issue 3036.)
* Do not recompile packages across roots (Fixes issue 3149.)
* Allow use of binary-only packages (Fixes issue 2775.)
* Avoid duplicate cgo dependencies (Fixes issue 3001.)
* Show less in go get -x.  (Fixes issue 2926.)
* Do not force repo root for existing checkout (Fixes issue 2969.)
* Show full syntax error list always (Fixes issue 2811.)
* Clean arguments before processing (Fixes issue 3034.)
* Add flags for compiler, linker arguments (Fixes issue 2996.)
* Pass flags in make.bash (Fixes issue 3091.)
* Unify build flags, defined in one place.
* Clean up error messages (Fixes issue 3075.  Fixes issue 2923.)
* Support local import paths (Fixes issue 3118.)
* Allow top-level package outside $GOPATH (Fixes issue 3009.)

In addition to these fixes, all commands now take a list of
go files as a way to specify a single package, just as go build and
go run always have.  This means you can:

        go list -json x.go
        go fix x.go
        go vet x.go
        go test x_test.go

Preliminary tests in test.bash.
Mainly testing things that the ordinary build does not.
I don't mind if the script doesn't run on Windows.

I expect that gccgo support is now broken, and I hope that
people will feel free to file issues and/or send CLs to fix it.  :-)

R=golang-dev, dsymonds, r, rogpeppe
CC=golang-dev
https://golang.org/cl/5708054
2012-03-01 12:12:22 -05:00
Russ Cox
ebe1664d27 go/build: replace FindTree, ScanDir, Tree, DirInfo with Import, Package
This is an API change, but one I have been promising would
happen when it was clear what the go command needed.

This is basically a complete replacement of what used to be here.

build.Tree is gone.

build.DirInfo is expanded and now called build.Package.

build.FindTree is now build.Import(package, srcDir, build.FindOnly).
The returned *Package contains information that FindTree returned,
but applicable only to a single package.

build.ScanDir is now build.ImportDir.

build.FindTree+build.ScanDir is now build.Import.

The new Import API allows specifying the source directory,
in order to resolve local imports (import "./foo") and also allows
scanning of packages outside of $GOPATH.  They will come back
with less information in the Package, but they will still work.

The old go/build API exposed both too much and too little.
This API is much closer to what the go command needs,
and it works well enough in the other places where it is
used.  Path is gone, so it can no longer be misused.  (Fixes issue 2749.)

This CL updates clients of go/build other than the go command.
The go command changes are in a separate CL, to be submitted
at the same time.

R=golang-dev, r, alex.brainman, adg
CC=golang-dev
https://golang.org/cl/5713043
2012-03-01 12:12:09 -05:00
Russ Cox
a72b87efa9 reflect: make Value.Interface return immutable data
Fixes #3134.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5713049
2012-03-01 11:48:27 -05:00
Russ Cox
dc159fabff runtime: run init on main thread
Fixes #3125.

R=golang-dev, r, minux.ma
CC=golang-dev
https://golang.org/cl/5714049
2012-03-01 11:48:17 -05:00
Russ Cox
03769efe41 cmd/dist: recognize CC="ccache clang" as clang
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5711052
2012-03-01 11:46:13 -05:00
Anthony Martin
d88af88dfb 5g, 8g: remove documentation dregs
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5714051
2012-02-29 22:56:50 -08:00
David Symonds
289a1638aa html/template: encoding/json does more escaping now, so update the html/template test that uses it.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5714052
2012-03-01 17:52:05 +11:00
David Symonds
99e45e49b7 encoding/json: escape output from Marshalers.
Fixes #3127.

R=rsc, r
CC=golang-dev
https://golang.org/cl/5707054
2012-03-01 17:41:59 +11:00
Alex Brainman
ed238ca4e5 os: release process handle at the end of windows (*Process).Wait
Fixes #3154.

R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/5707052
2012-03-01 17:36:35 +11:00
David Symonds
1f0f459a16 encoding/gob: more hardening for lengths of input strings.
Fixes #3160.

R=r
CC=golang-dev
https://golang.org/cl/5716046
2012-03-01 15:57:54 +11:00
Rob Pike
dd001b5931 text/template: add examples that use multiple templates
Fixes #2742.

R=golang-dev, peterthrun, adg
CC=golang-dev
https://golang.org/cl/5699083
2012-03-01 14:55:18 +11:00
Robert Griesemer
fd5718ce82 go/printer, gofmt: improved comment placement
Applied gofmt -w src misc (no changes).

Fixes #3147.

R=r, rsc
CC=golang-dev
https://golang.org/cl/5710046
2012-02-29 17:25:15 -08:00
Rob Pike
5a5279e128 io: Pipes and ReadAt are safe to use concurrently.
Updates #1599.

R=golang-dev, bradfitz, rsc, r
CC=golang-dev
https://golang.org/cl/5708056
2012-03-01 11:24:13 +11:00
Johan Euphrosine
6652b0b866 doc: add The Laws of Reflection article
Originally published on The Go Programming Language Blog, September 6, 2011.

http://blog.golang.org/2011/09/laws-of-reflection.html

Update #2547

R=golang-dev, r, adg
CC=golang-dev
https://golang.org/cl/5689054
2012-03-01 10:05:51 +11:00
Mikio Hara
7301065fcc net: make -external flag for tests default to true
go test -short # like in the build; no external stuff
go test # long tests, + external
go test -external=false # long tests, no external

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5696079
2012-03-01 07:39:03 +09:00
Anthony Martin
564a1f3358 gc: fix string comparisons for new bool rules
The two string comparison optimizations were
missing the implicit cast from ideal bool.

Fixes #3119.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5696071
2012-02-29 13:55:50 -08:00
Russ Cox
fc268acf05 path/filepath: steer people away from HasPrefix
The strikes against it are:

1. It does not take path boundaries into account.
2. It assumes that Windows==case-insensitive file system
and non-Windows==case-sensitive file system, neither of
which is always true.
3. Comparing ToLower against ToLower is not a correct
implementation of a case-insensitive string comparison.
4. If it returns true on Windows you still don't know how long
the matching prefix is in bytes, so you can't compute what
the suffix is.

R=golang-dev, r, dsymonds, r
CC=golang-dev
https://golang.org/cl/5712045
2012-02-29 16:37:40 -05:00
Brad Fitzpatrick
8c5290502f time: skip a often-flaky test in short mode
In -test.short mode, skip measuring the upper bound of time
sleeps. The API only guarantees minimum bounds on sleeps,
anyway, so this isn't a bug we're ignoring as much as it is
simply observing bad builder virtualization and/or loaded
machines.

We keep the test in full mode where developers will
presumably be running on a lightly-loaded, native, fast
machine.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5713044
2012-02-29 13:14:05 -08:00
Russ Cox
7aba72baaa os: diagnose chdir error during StartProcess
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5711044
2012-02-29 15:53:57 -05:00
Russ Cox
b47cef394b path/filepath: note that SplitList is different from strings.Split
R=golang-dev, r, bradfitz, gustavo
CC=golang-dev
https://golang.org/cl/5712044
2012-02-29 15:50:46 -05:00
Russ Cox
d0d251f858 gc: disallow absolute import paths
They are broken and hard to make work.

They have never worked: if you import "/tmp/x"
from "/home/rsc/p.c" then the compiler rewrites
this into import "/home/rsc/tmp/x", which is
clearly wrong.

Also we just disallowed the : character in import
paths, so import "c:/foo" is already not allowed.

Finally, in order to support absolute paths well in
a build tool we'd have to provide a mechanism to
instruct the compiler to resolve absolute imports
by looking in some other tree (where the binaries live)
and provide a mapping from absolute path to location
in that tree.  This CL avoids adding that complexity.

This is not part of the language spec (and should not be),
so no spec change is needed.

If we need to make them work later, we can.

R=ken2
CC=golang-dev
https://golang.org/cl/5712043
2012-02-29 15:28:36 -05:00
Brad Fitzpatrick
8f0bfc5a29 net/http/httptest: make Server.Close wait for outstanding requests to finish
Might fix issue 3050

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5708066
2012-02-29 12:18:26 -08:00
Shenghou Ma
357b257cd1 runtime/pprof: skip test on 64-bit Mac OS X 10.6
R=rsc, bsiegert
CC=golang-dev
https://golang.org/cl/5709060
2012-03-01 03:11:37 +08:00
Shenghou Ma
df3a841021 doc: elaborate available checks for cmd/vet
R=golang-dev, r, ality, r
CC=golang-dev
https://golang.org/cl/5709053
2012-03-01 02:22:35 +08:00
Brad Fitzpatrick
3684ae9da0 net/http: make a test more paranoid & reliable on Windows, maybe.
Part of diagnosing issue 3050.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5707056
2012-02-29 09:53:20 -08:00
Brad Fitzpatrick
f5df930618 net/http: fix ProxyFromEnvironment bug, docs, add tests
Fixes #2919 I believe. (gets as far as sending a CONNECT
request to my little dummy logging proxy that doesn't actually
support CONNECT now.)  Untested with a real CONNECT-supporting
proxy, though.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5708055
2012-02-29 09:52:52 -08:00
Brad Fitzpatrick
02b124e59a net/http/httputil: make https DumpRequestOut less racy
It's still racy in that it mutates req.Body, though.  *shrug*

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5709054
2012-02-29 09:52:28 -08:00
Robert Hencke
fc79058199 gob: trivial print fix
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5707062
2012-02-29 08:45:57 -08:00
Robert Griesemer
b1b0ed1e60 go/printer: replace multiline logic
This CL mostly deletes code.

Using existing position information is
just as good to determine if a new section
is needed; no need to track exact multi-
line information. Eliminates the need to
carry around a multiLine parameter with
practically every function.

Applied gofmt -w src misc resulting in only
a minor change to godoc.go. In return, a couple
of test cases are now formatted better.

Not Go1-required, but nice-to-have as it will
simplify fixes going forward.

R=rsc
CC=golang-dev
https://golang.org/cl/5706055
2012-02-29 08:38:31 -08:00
Luuk van Dijk
fb2706113f pkg/runtime: 2 sanity checks in the runtime-gdb.py prettyprinters.
Don't try to print obviously corrupt slices or interfaces.
Doesn't actually solve 3047 or 2818, but seems a good idea anyway.

R=rsc, bsiegert
CC=golang-dev
https://golang.org/cl/5708061
2012-02-29 16:42:25 +01:00
Mikio Hara
ecdd9f2376 net: minor fixes to test
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5707058
2012-02-29 12:34:05 +09:00
Rob Pike
ee149d9a6b io: document that i/o is not necessarily safe for parallel access.
Updates #1599.

R=golang-dev, adg, dsymonds
CC=golang-dev
https://golang.org/cl/5704052
2012-02-29 13:30:08 +11:00
Brad Fitzpatrick
1b1039a1c1 net/http/httputil: fix DumpRequestOut on https URLs
Don't try to do an SSL negotiation with a *bytes.Buffer.

Fixes #3135

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5709050
2012-02-28 16:03:32 -08:00
Mikio Hara
e266d6064c net: fix comment on Dial with unixgram
We should use DialUnix or ListenPacket for unixgram networks
because Dial doesn't take a local UnixAddr.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5706043
2012-02-29 07:45:38 +09:00
Russ Cox
38a03de6a1 go/build: move code around
Only copy+paste here.
Will make next code review's diffs a bit smaller.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5704050
2012-02-28 16:34:41 -05:00
Russ Cox
6e2ae0a12c runtime/pprof: support OS X CPU profiling
Work around profiling kernel bug with signal masks.
Still broken on 64-bit Snow Leopard kernel,
but I think we can ignore that one and let people
upgrade to Lion.

Add new trivial tools addr2line and objdump to take
the place of the GNU tools of the same name, since
those are not installed on OS X.

Adapt pprof to invoke 'go tool addr2line' and
'go tool objdump' if the system tools do not exist.

Clean up disassembly of base register on amd64.

Fixes #2008.

R=golang-dev, bradfitz, mikioh.mikioh, r, iant
CC=golang-dev
https://golang.org/cl/5697066
2012-02-28 16:18:24 -05:00
Rémy Oudompheng
c10f50859e all: remove various unused unexported functions and constants.
R=golang-dev, minux.ma, rsc
CC=golang-dev, remy
https://golang.org/cl/5702050
2012-02-28 21:48:03 +01:00
Rob Pike
250fa82122 net/rpc: API changes, all documentation
except for hiding one type that is only used internally.

Fixes #2944.

R=golang-dev, rsc, kevlar
CC=golang-dev
https://golang.org/cl/5707044
2012-02-29 07:34:28 +11:00
Shenghou Ma
26daf6a03f cmd/dist: force line-buffering stdout/stderr on Unix
If stdout and stderr are indeed the same file (not a tty), which is
        often the case, fully-buffered stdout will make it harder to see
        progresses, for example, ./make.bash 2>&1 | tee log

R=r, rsc
CC=golang-dev
https://golang.org/cl/5700070
2012-02-29 02:22:28 +08:00
Mikkel Krautz
fb1a5fcacf crypto/tls: force OS X target version to 10.6 for API compatibility
This is a band-aid until we can use weak imports with cgo.

Fixes #3131.

R=minux.ma, rsc
CC=golang-dev
https://golang.org/cl/5700083
2012-02-28 11:34:48 -05:00
Shenghou Ma
e0aa36147d encoding/gob: fix "// +build" comment for debug.go
R=golang-dev, rsc, adg, r, r
CC=golang-dev
https://golang.org/cl/5693060
2012-02-28 13:39:42 +08:00
Robert Griesemer
e952e241ae gotype: provide -comments flag
When debugging ASTs, it's useful to also
see the comments on occasion. Usage:

gotype -ast -comments file.go

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5703043
2012-02-27 21:35:26 -08:00
Rob Pike
26c2443d80 text/template: add example showing use of custom function
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5694100
2012-02-28 15:50:41 +11:00
Rob Pike
180541b2b1 text/template: fix redefinition bugs
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5696087
2012-02-28 14:23:57 +11:00
Rob Pike
7201b0c27c tutorial: delete
Instead we'll point people at the Tour and beef up code.html.

Fixes #3107.

R=golang-dev, bradfitz, r, adg
CC=golang-dev
https://golang.org/cl/5697077
2012-02-28 13:35:58 +11:00
Mikio Hara
d9c5626047 net: no panic on placeholders for netbsd
Perhaps it might be better than panic.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5701064
2012-02-28 10:58:01 +09:00
David Symonds
9dd746c4cb encoding/json: drop MarshalForHTML; gofix calls to Marshal.
I've elected to omit escaping the output of Marshalers for now.
I haven't thought through the implications of that;
I suspect that double escaping might be the undoing of that idea.

Fixes #3127.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5694098
2012-02-28 11:41:16 +11:00
Benny Siegert
740d503866 net: add stubs for NetBSD
This fixes the build of package net for GOOS=NetBSD.
Of course, a real implementation would be even better.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5693065
2012-02-28 11:28:10 +11:00
Benny Siegert
8c7b832ad5 os: fix NetBSD build
os.fileStat.Sys is no longer exported.

R=golang-dev, m4dh4tt3r, r
CC=golang-dev
https://golang.org/cl/5696074
2012-02-28 11:26:01 +11:00
Brad Fitzpatrick
fa33fdbc7d encoding/binary: better example
leave that joke to Java.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5695080
2012-02-28 10:15:23 +11:00
Andrew Gerrand
ce51e10749 archive/zip: use encoding/binary again, add readBuf helper
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5699097
2012-02-28 09:41:30 +11:00
Anthony Martin
eafe86c2df go/printer: fix printing of variadic function calls
Fixes #3130.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5697062
2012-02-27 13:56:43 -08:00
Rob Pike
5573fa3bc5 cmd/go: mention examples in docs for -test.run
Missed in my last round. These things sure appear
in a lot of places.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5699096
2012-02-28 08:55:25 +11:00
Rob Pike
ec15046a8d cmd/go: drop -example, apply -run to examples
Once more, with feeling.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5698080
2012-02-28 08:33:06 +11:00
Robert Griesemer
b495e5c538 strings: make Count example show results
Thanks to dr.volker.dobler for tracking this down.

Filed a long-term issue (3142) which may eventually
resolve this problem w/o the need for a manual fix.

R=iant
CC=golang-dev
https://golang.org/cl/5698078
2012-02-27 12:22:10 -08:00
Robert Griesemer
ab169c6e3f godoc: don't show directories w/o packages in flat dir mode
The main change is simple: Both the Directory and DirEntry
struct have an extra field 'HasPkg' indicating whether the
directory contains any package files. The remaining changes
are more comments and adjustments to the template files.

Fixes #3121.

R=golang-dev, bradfitz, sameer
CC=golang-dev
https://golang.org/cl/5699072
2012-02-27 11:18:00 -08:00
Anthony Martin
0706d00cb8 go/printer: fix test for new import path restrictions
Import paths with spaces are now invalid.

The builders would've caught this if they were running
the long tests.  I've removed the check for short tests
in this package since the current tests are fast enough
already.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5694082
2012-02-27 10:01:45 -08:00
Shenghou Ma
56ae9032b2 cmd/go: test -i should not disable -c
Fixes #3104.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5699088
2012-02-27 12:33:14 -05:00
Andrew Gerrand
eb825b58cc archive/zip: use smarter putUintXX functions to hide offsets
R=bradfitz, r, dsymonds, kyle
CC=golang-dev
https://golang.org/cl/5701055
2012-02-27 17:37:59 +11:00
Andrew Gerrand
228f44a1f5 archive/zip: stop using encoding/binary
R=golang-dev, r, bradfitz
CC=golang-dev
https://golang.org/cl/5694085
2012-02-27 16:29:22 +11:00
Rob Pike
28668c3a28 cmd/go: run examples even if -run is set if -example is also set
Allows one to disable everything but the example being debugged.
This time for sure.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5700079
2012-02-27 16:23:22 +11:00
Rob Pike
5876b4eb28 testing: add -test.example flag to control execution of examples
Also, don't run examples if -test.run is set.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5697069
2012-02-27 12:49:10 +11:00
Alex Brainman
c7482b9196 os: implement sameFile on windows
Fixes #2511.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5687072
2012-02-27 12:29:33 +11:00
Mikkel Krautz
e4db4e9b58 crypto/x509: fix typo in Verify documentation
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5695070
2012-02-27 11:49:06 +11:00
Mike Rosset
4762e9d98c html/template: use correct method signature, in introduction example.
R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/5695067
2012-02-27 11:31:38 +11:00
Rob Pike
b49dcb9d37 cmd/go: explain x... vs. x/... in help importpath
Fixes #3110.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5696083
2012-02-27 09:51:58 +11:00
Brad Fitzpatrick
761f946617 net/http/cgi: add an empty response test
New test for http://code.google.com/p/go/source/detail?r=a73ba18

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5701046
2012-02-26 14:46:22 -08:00
Rob Pike
d781603931 time: add a comment about how to use the Duration constants
R=golang-dev, bradfitz, r, dsymonds
CC=golang-dev
https://golang.org/cl/5696078
2012-02-26 22:24:51 +11:00
Shenghou Ma
bdca78e1a7 cmd/yacc/units.y: update comment, give better error messages when $GOROOT not set
R=r, golang-dev
CC=golang-dev
https://golang.org/cl/5698062
2012-02-26 01:36:26 +08:00
Robert Griesemer
5c7799f108 go: fix help text documenting example functions
R=adg, r
CC=golang-dev
https://golang.org/cl/5695062
2012-02-24 15:42:25 -08:00
Robert Griesemer
34e60a81d5 go/ast: examples for ast.Print, ast.Inspect
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5700057
2012-02-24 13:44:36 -08:00
Robert Griesemer
0a33b703e6 go/doc, godoc: fix range of type declarations
For grouped type declarations, go/doc introduces
fake individual declarations. Don't use the original
location of the "type" keyword because it will lead
to an overly large source code range for that fake
declaration, and thus an overly large selection shown
via godoc (e.g.: click on the AssignStmt link for:
http://golang.org/pkg/go/ast/#AssignStmt ).

Also: Don't create a fake declaration if not needed.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5694061
2012-02-24 13:44:22 -08:00
Rob Pike
1086dd7cfb cmd/go: in list, don't print blank lines for no output
Otherwise
        go list -f "{{if .Stale}}{{.ImportPath}}{{end}}" all
and similar commands can print pages of empty lines.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5696058
2012-02-25 08:00:55 +11:00
Russ Cox
102274a30e runtime: size arena to fit in virtual address space limit
For Brad.
Now FreeBSD/386 binaries run on nearlyfreespeech.net.

Fixes #2302.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5700060
2012-02-24 15:28:51 -05:00
Russ Cox
d8ccebfffa net/http/cgi: fix empty response
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5693058
2012-02-24 15:10:46 -05:00
Anthony Martin
dc38756ce1 gc: reject import paths containing special characters
Also allow multiple invalid import statements in a
single file.

Fixes #3021. The changes to go/parser and the
language specifcation have already been committed.

R=rsc, gri
CC=golang-dev
https://golang.org/cl/5672084
2012-02-24 14:48:36 -05:00
Gustavo Niemeyer
490c3d4a42 encoding/xml: fix anonymous field Unmarshal example
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5697043
2012-02-24 14:45:32 -05:00
Shenghou Ma
04f110e530 cmd/vet: don't give error for Printf("%+5.2e", x)
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5696048
2012-02-25 01:16:17 +08:00
Sanjay Menakuru
27e07a2666 os: fix minor typo
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5697051
2012-02-24 22:42:16 +11:00
Rob Pike
3a1c226a38 reflect.DeepEqual: don't panic comparing functions
Functions are equal iff they are both nil.

Fixes #3122.

R=golang-dev, dsymonds, rsc
CC=golang-dev
https://golang.org/cl/5693057
2012-02-24 16:25:39 +11:00
Russ Cox
51a84bbfaa runtime: fix arm
signal.test binary passes on my phone; should fix builder

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5694064
2012-02-23 23:10:38 -05:00
Russ Cox
075eef4018 gc: fix escape analysis + inlining + closure bug
R=ken2
CC=golang-dev, lvd
https://golang.org/cl/5693056
2012-02-23 23:09:53 -05:00
Russ Cox
15d8b05f0c ld: fix alignment of rodata section
We were not aligning the code size,
so read-only data, which follows in the same
segment, could be arbitrarily misaligned.

Fixes #2506.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5693055
2012-02-23 23:01:36 -05:00
Russ Cox
9984a5bca4 cmd/cc: grow some global arrays
Avoids global array buffer overflows if they are
indexed using some of the values between NTYPE
and NALLTYPE.  It is entirely likely that not all of these
are necessary, but this is the C compiler and not worth
worrying much about.  This change takes up only a
few more bytes of memory and makes the behavior
deterministic.

Fixes #3078.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5693052
2012-02-23 22:45:55 -05:00
Russ Cox
91bdbf591f net/rpc: silence read error on closing connection
Fixes #3113.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5698056
2012-02-23 22:45:44 -05:00
Mikio Hara
705ebf1144 net: reorganize test files
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5694063
2012-02-24 11:58:30 +09:00