]> Cypherpunks repositories - gostls13.git/log
gostls13.git
13 years agoarchive/zip: tweak API and docs.
Andrew Gerrand [Wed, 8 Feb 2012 03:34:40 +0000 (14:34 +1100)]
archive/zip: tweak API and docs.

Fixes #2835.

R=golang-dev, n13m3y3r, r, bradfitz
CC=golang-dev
https://golang.org/cl/5645051

13 years agoencoding/csv: document ReadAll behavior at EOF
Rob Pike [Wed, 8 Feb 2012 03:24:04 +0000 (14:24 +1100)]
encoding/csv: document ReadAll behavior at EOF

Fixes #2847.

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

13 years agonet/http: don't ignore some errors in tests
Brad Fitzpatrick [Wed, 8 Feb 2012 03:15:25 +0000 (19:15 -0800)]
net/http: don't ignore some errors in tests

to help debug Issue 2651

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5644049

13 years agoencoding/binary: hide TotalSize
Rob Pike [Wed, 8 Feb 2012 03:09:20 +0000 (14:09 +1100)]
encoding/binary: hide TotalSize

The function has a bizarre signature: it was the only public function there
that exposed the reflect package. Also, its definition is peculiar and hard to
explain. It doesn't merit being exported.

This is an API change but really, it should never have been exported and
it's certain very few programs will depend on it: it's too weird.

Fixes #2846.

R=golang-dev, gri, bradfitz
CC=golang-dev
https://golang.org/cl/5639054

13 years agocmd/api: compare multiple contexts
Brad Fitzpatrick [Wed, 8 Feb 2012 02:13:11 +0000 (18:13 -0800)]
cmd/api: compare multiple contexts

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

13 years agobufio: drop error return for NewReaderSize and NewWriterSize
Rob Pike [Wed, 8 Feb 2012 02:07:13 +0000 (13:07 +1100)]
bufio: drop error return for NewReaderSize and NewWriterSize
It complicates the interface unnecessarily.
Document this in go1.html.
Also update the go/doc Makefile.

Fixes #2836.

R=golang-dev, gri, bradfitz
CC=golang-dev
https://golang.org/cl/5642054

13 years agonet/http/httputil: preserve query params in reverse proxy
Brad Fitzpatrick [Wed, 8 Feb 2012 02:00:30 +0000 (18:00 -0800)]
net/http/httputil: preserve query params in reverse proxy

Fixes #2853

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5642056

13 years agoencoding/hex: canonicalize error type names
Rob Pike [Wed, 8 Feb 2012 00:53:32 +0000 (11:53 +1100)]
encoding/hex: canonicalize error type names
Also simplify the tests.

Fixes #2849.

R=golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/5643045

13 years agoimage: delete the image.Repeated type.
Nigel Tao [Wed, 8 Feb 2012 00:41:47 +0000 (11:41 +1100)]
image: delete the image.Repeated type.

R=r
CC=golang-dev
https://golang.org/cl/5636045

13 years agoio/ioutil: document EOF behavior in ReadFile and ReadAll
Rob Pike [Wed, 8 Feb 2012 00:40:56 +0000 (11:40 +1100)]
io/ioutil: document EOF behavior in ReadFile and ReadAll

Fixes #2862.

R=golang-dev, n13m3y3r, iant
CC=golang-dev
https://golang.org/cl/5646048

13 years agobug408: delete
Rob Pike [Tue, 7 Feb 2012 23:52:54 +0000 (10:52 +1100)]
bug408: delete
It's disabled and unreproducible.

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

13 years agogo/printer, gofmt: don't print incorrect programs
Robert Griesemer [Tue, 7 Feb 2012 23:19:52 +0000 (15:19 -0800)]
go/printer, gofmt: don't print incorrect programs

Be careful when printing line comments with incorrect
position information. Maintain additional state
impliedSemi: when set, a comment containing a newline
would imply a semicolon and thus placement must be
delayed.

Precompute state information pertaining to the next
comment for faster checks (the printer is marginally
faster now despite additional checks for each comment).

No effect on existing src, misc sources.

Fixes #1505.

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

13 years ago5l, 6l, 8l: implement -X flag
Russ Cox [Tue, 7 Feb 2012 21:46:33 +0000 (16:46 -0500)]
5l, 6l, 8l: implement -X flag

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5643050

13 years agotest: disable bug408
Russ Cox [Tue, 7 Feb 2012 20:50:26 +0000 (15:50 -0500)]
test: disable bug408

Fixes #2902.

TBR=golang-dev
CC=golang-dev
https://golang.org/cl/5641047

13 years agoflag: describe valid input for Duration flags.
David Symonds [Tue, 7 Feb 2012 06:50:04 +0000 (17:50 +1100)]
flag: describe valid input for Duration flags.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5639046

13 years agoencoding/gob: document CommonType
Rob Pike [Tue, 7 Feb 2012 05:15:55 +0000 (16:15 +1100)]
encoding/gob: document CommonType
Also bring the names in doc.go in line with the source.
More radical resolutions are possible but require substantial internal
changes for very little benefit. Fixing it this way lets us keep the
embedding, which has a huge simplifying effect, and guarantees
binary compatibility.

Fixes #2848.

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

13 years agoencoding/xml: fix documentation for Decoder.Skip
Rob Pike [Tue, 7 Feb 2012 05:15:35 +0000 (16:15 +1100)]
encoding/xml: fix documentation for Decoder.Skip

Fixes #2850.

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

13 years agobufio: remove special error type, update docs
Rob Pike [Tue, 7 Feb 2012 05:15:03 +0000 (16:15 +1100)]
bufio: remove special error type, update docs
Updates #2836.

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

13 years agomisc/osx: update for dist tool, drop image.bash, update readme
Andrew Gerrand [Tue, 7 Feb 2012 03:37:57 +0000 (14:37 +1100)]
misc/osx: update for dist tool, drop image.bash, update readme

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5639043

13 years agocmd/dist: prevent race on VERSION creation
Gustavo Niemeyer [Tue, 7 Feb 2012 02:38:15 +0000 (00:38 -0200)]
cmd/dist: prevent race on VERSION creation

Commands such as "dist version > VERSION" will cause
the shell to create an empty VERSION file and set dist's
stdout to its fd. dist in turn looks at VERSION and uses
its content if available, which is empty at this point.

Fix that by ignoring VERSION if it's empty.

Also prevent cmdversion from running findgoversion a
second time. It was already loaded by init.

R=adg, gustavo, rsc
CC=golang-dev
https://golang.org/cl/5639044

13 years agofix build: wrong godoc code submitted before
Robert Griesemer [Tue, 7 Feb 2012 01:54:20 +0000 (17:54 -0800)]
fix build: wrong godoc code submitted before

R=r
CC=golang-dev
https://golang.org/cl/5644044

13 years agogo/token: remove dependency on encoding/gob
Robert Griesemer [Tue, 7 Feb 2012 01:41:19 +0000 (17:41 -0800)]
go/token: remove dependency on encoding/gob

R=dsymonds
CC=golang-dev
https://golang.org/cl/5636053

13 years agonet: run TestDialTimeout on windows
Alex Brainman [Tue, 7 Feb 2012 01:05:59 +0000 (12:05 +1100)]
net: run TestDialTimeout on windows

R=golang-dev, rsc
CC=bradfitz, golang-dev, mikioh.mikioh
https://golang.org/cl/5616066

13 years agopath/filepath: repair and simplify the symlink test
Rob Pike [Tue, 7 Feb 2012 00:00:13 +0000 (11:00 +1100)]
path/filepath: repair and simplify the symlink test
I hate symlinks.
Fixes #2787.

R=golang-dev, dsymonds, rsc
CC=golang-dev
https://golang.org/cl/5638043

13 years agomisc/osx: don't set GOROOT or modify profile files
Andrew Gerrand [Mon, 6 Feb 2012 23:38:10 +0000 (10:38 +1100)]
misc/osx: don't set GOROOT or modify profile files

There's no reason to set GOROOT as the tools will have the path baked
into it with GOROOT_FINAL.

R=bradfitz, bytbox, gustavo, rsc
CC=golang-dev
https://golang.org/cl/5576064

13 years agosyscall: add Timeval.Nano, Timespec.Nano, for conversion to Duration
Russ Cox [Mon, 6 Feb 2012 23:04:12 +0000 (18:04 -0500)]
syscall: add Timeval.Nano, Timespec.Nano, for conversion to Duration

Fixes #2534.

R=golang-dev, dsymonds, bradfitz
CC=golang-dev
https://golang.org/cl/5635051

13 years agogo_spec: primality is elusive
Rob Pike [Mon, 6 Feb 2012 19:59:36 +0000 (06:59 +1100)]
go_spec: primality is elusive
This time for sure.

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

13 years agocgo: print line numbers in fatal errors when relevant.
Rémy Oudompheng [Mon, 6 Feb 2012 19:38:54 +0000 (20:38 +0100)]
cgo: print line numbers in fatal errors when relevant.

Signatures of fatalf and error_ helpers have been matched for
consistency.
Fixes #1800.

R=rsc
CC=golang-dev, remy
https://golang.org/cl/5593049

13 years agobuild: add make.bash --dist-tool
Russ Cox [Mon, 6 Feb 2012 18:48:43 +0000 (13:48 -0500)]
build: add make.bash --dist-tool

R=golang-dev, n13m3y3r
CC=golang-dev
https://golang.org/cl/5634048

13 years agodoc: remove overuse of simply
Russ Cox [Mon, 6 Feb 2012 18:34:35 +0000 (13:34 -0500)]
doc: remove overuse of simply

Specifically, remove simply where it is claiming that the
code or the action to be carried out is simple, since the
reader might disagree.

R=golang-dev, bradfitz, gri
CC=golang-dev
https://golang.org/cl/5637048

13 years agobuild: delete make paraphernalia
Russ Cox [Mon, 6 Feb 2012 18:34:25 +0000 (13:34 -0500)]
build: delete make paraphernalia

As a convenience to people working on the tools,
leave Makefiles that invoke the go dist tool appropriately.
They are not used during the build.

R=golang-dev, bradfitz, n13m3y3r, gustavo
CC=golang-dev
https://golang.org/cl/5636050

13 years agocmd/dist: ignore file names beginning with . or _
Russ Cox [Mon, 6 Feb 2012 18:33:22 +0000 (13:33 -0500)]
cmd/dist: ignore file names beginning with . or _

This is the same heuristic that build.ScanDir uses.
It avoids considering 'resource fork' files on OS X;
the resource for x.go is ._x.go.

R=gri
CC=golang-dev
https://golang.org/cl/5616073

13 years agoruntime: delete UpdateMemStats, replace with ReadMemStats(&stats).
Rémy Oudompheng [Mon, 6 Feb 2012 18:16:26 +0000 (19:16 +0100)]
runtime: delete UpdateMemStats, replace with ReadMemStats(&stats).

Unexports runtime.MemStats and rename MemStatsType to MemStats.
The new accessor requires passing a pointer to a user-allocated
MemStats structure.

Fixes #2572.

R=bradfitz, rsc, bradfitz, gustavo
CC=golang-dev, remy
https://golang.org/cl/5616072

13 years agodatabase/sql: permit scanning into interface{}
Brad Fitzpatrick [Mon, 6 Feb 2012 18:06:22 +0000 (10:06 -0800)]
database/sql: permit scanning into interface{}

See thread http://goo.gl/7zzzU for background.

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

13 years ago8a, 8l: implement support for RDTSC instruction.
Shenghou Ma [Mon, 6 Feb 2012 17:49:28 +0000 (12:49 -0500)]
8a, 8l: implement support for RDTSC instruction.
        Also modify runtime/asm_386.s to use it.

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

13 years agobuild: remove unnecessary pragmas
Anthony Martin [Mon, 6 Feb 2012 17:45:23 +0000 (12:45 -0500)]
build: remove unnecessary pragmas

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

13 years agocmd/go: fixed panic on `go clean -n` and `go clean -x`.
Sanjay Menakuru [Mon, 6 Feb 2012 17:40:59 +0000 (12:40 -0500)]
cmd/go: fixed panic on `go clean -n` and `go clean -x`.
        also made generated scripts act more like running go clean itself

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

13 years agocmd/gc: disallow switch _ := v.(type)
Russ Cox [Mon, 6 Feb 2012 17:35:29 +0000 (12:35 -0500)]
cmd/gc: disallow switch _ := v.(type)

Fixes #2827.

R=ken2
CC=golang-dev
https://golang.org/cl/5638045

13 years agomisc/goplay: use go tool "run"
Olivier Duperray [Mon, 6 Feb 2012 17:10:49 +0000 (12:10 -0500)]
misc/goplay: use go tool "run"

Fixes #2872

R=andybalholm, rsc
CC=golang-dev
https://golang.org/cl/5608056

13 years agocmd/go: pass env CGO_CFLAGS to cgo
Jeff Hodges [Mon, 6 Feb 2012 16:26:15 +0000 (11:26 -0500)]
cmd/go: pass env CGO_CFLAGS to cgo

Passing the CGO_CFLAGS to cgo is required to make alternative include
directories work when building a cgo project.

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

13 years agoruntime: fix float64 hash on 32-bit machine
Russ Cox [Mon, 6 Feb 2012 16:24:34 +0000 (11:24 -0500)]
runtime: fix float64 hash on 32-bit machine

Multiplying by the low 32 bits was a bad idea
no matter what, but it was a particularly unfortunate
choice because those bits are 0 for small integer values.

Fixes #2883.

R=ken2
CC=golang-dev
https://golang.org/cl/5634047

13 years agoruntime: use GOTRACEBACK to decide whether to show runtime frames
Russ Cox [Mon, 6 Feb 2012 16:24:14 +0000 (11:24 -0500)]
runtime: use GOTRACEBACK to decide whether to show runtime frames

Right now, GOTRACEBACK=0 means do not show any stack traces.
Unset means the default behavior (declutter by hiding runtime routines).

This CL makes GOTRACEBACK=2 mean include the runtime routines.
It avoids having to recompile the runtime when you want to see
the runtime in the tracebacks.

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

13 years agocmd/gc: another special (%hhS) case for method names.
Luuk van Dijk [Mon, 6 Feb 2012 15:38:59 +0000 (16:38 +0100)]
cmd/gc: another special (%hhS) case for method names.

Fixes #2877

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

13 years agocmd/gc: fix codegen reordering for expressions involving && and ||
Luuk van Dijk [Mon, 6 Feb 2012 14:41:01 +0000 (15:41 +0100)]
cmd/gc: fix codegen reordering for expressions involving && and ||

Fixes #2821.

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

13 years agoarchive/zip: support full range of FileMode flags
Gustavo Niemeyer [Mon, 6 Feb 2012 13:58:32 +0000 (11:58 -0200)]
archive/zip: support full range of FileMode flags

Zip files may actually store symlinks, and that's represented
as a file with unix flag S_IFLNK and with its data containing
the symlink target name.

The other flags are being supported too. Now that the os package
has the full range of flags in a system agnostic manner, there's
no reason to discard that information.

R=golang-dev, adg, rogpeppe
CC=golang-dev
https://golang.org/cl/5624048

13 years agogc: don't print implicit type on struct literal in export
Luuk van Dijk [Mon, 6 Feb 2012 11:19:59 +0000 (12:19 +0100)]
gc: don't print implicit type on struct literal in export

As pointed out in the discussion around 2678.

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

13 years agonet/http: Don't set Content-Type header for HEAD requests by default
Patrick Mylund Nielsen [Mon, 6 Feb 2012 06:55:47 +0000 (17:55 +1100)]
net/http: Don't set Content-Type header for HEAD requests by default
since the real type is not inferred.
Fixes #2885.

R=golang-dev, dsymonds, bradfitz
CC=golang-dev
https://golang.org/cl/5633045

13 years agoA+C: Patrick Mylund Nielsen (individual CLA)
David Symonds [Mon, 6 Feb 2012 06:54:56 +0000 (17:54 +1100)]
A+C: Patrick Mylund Nielsen (individual CLA)

R=golang-dev
TBR=adg
CC=golang-dev, patrick
https://golang.org/cl/5616070

13 years agobytes: API tweaks
Rob Pike [Mon, 6 Feb 2012 04:29:21 +0000 (15:29 +1100)]
bytes: API tweaks
- fix documentation for NewBuffer and NewBufferString
- document and implement behavior of Truncate on invalid lengths

Fixes #2837.

R=rsc, adg
CC=golang-dev
https://golang.org/cl/5637044

13 years agoio: API tweaks
Rob Pike [Mon, 6 Feb 2012 04:09:50 +0000 (15:09 +1100)]
io: API tweaks
- eliminate local Error type (a historical artifact)
- fix documentation of CopyN
- fix documentation of WriteString
Fixes #2859.

R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5636046

13 years ago cmd/go: build: print import errors when invoked on files
Kyle Lemons [Mon, 6 Feb 2012 03:10:03 +0000 (14:10 +1100)]
        cmd/go: build: print import errors when invoked on files

      This fix makes the goFilesPackage helper function print the errors from
      package imports and exit similar to how the packagesForBuild function does.

      Without this change, when invoking "go build *.go" with, for example,
      an old import path, the following stack trace is generated:

      panic: runtime error: invalid memory address or nil pointer dereference

      goroutine 1 [running]:
      go/build.(*Tree).PkgDir(...)
              /opt/go/src/pkg/go/build/path.go:52 +0xfb
      main.(*builder).action(...)
              /opt/go/src/cmd/go/build.go:327 +0xb8
      main.(*builder).action(...)
              /opt/go/src/cmd/go/build.go:335 +0x208
      main.runBuild(...)
              /opt/go/src/cmd/go/build.go:129 +0x386
      main.main()
              /opt/go/src/cmd/go/main.go:126 +0x2d8

Fixes #2865.

R=rsc, dvyukov, r
CC=golang-dev
https://golang.org/cl/5624052

13 years agoall: avoid bytes.NewBuffer(nil)
Rob Pike [Mon, 6 Feb 2012 03:09:00 +0000 (14:09 +1100)]
all: avoid bytes.NewBuffer(nil)
The practice encourages people to think this is the way to
create a bytes.Buffer when new(bytes.Buffer) or
just var buf bytes.Buffer work fine.
(html/token.go was missing the point altogether.)

R=golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/5637043

13 years agogob: fuzz testing, plus a fix for very large type names.
David Symonds [Mon, 6 Feb 2012 03:02:12 +0000 (14:02 +1100)]
gob: fuzz testing, plus a fix for very large type names.

Fixes #2689.

R=r
CC=golang-dev
https://golang.org/cl/5616063

13 years agotesting: capture panics, present them, and mark the test as a failure.
David Symonds [Mon, 6 Feb 2012 03:00:23 +0000 (14:00 +1100)]
testing: capture panics, present them, and mark the test as a failure.

R=r
CC=golang-dev
https://golang.org/cl/5633044

13 years agohtml: add package doc.
Nigel Tao [Mon, 6 Feb 2012 02:24:45 +0000 (13:24 +1100)]
html: add package doc.

Fixes #2857.

R=r, adg
CC=golang-dev
https://golang.org/cl/5635046

13 years agonet: fix Plan 9 build
Anthony Martin [Mon, 6 Feb 2012 00:59:32 +0000 (16:59 -0800)]
net: fix Plan 9 build

R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/5631051

13 years ago.hgignore: delete more dregs
Rob Pike [Mon, 6 Feb 2012 00:25:28 +0000 (11:25 +1100)]
.hgignore: delete more dregs

R=golang-dev, ality
CC=golang-dev
https://golang.org/cl/5636044

13 years ago.hgignore: delete dregs
Rob Pike [Mon, 6 Feb 2012 00:09:38 +0000 (11:09 +1100)]
.hgignore: delete dregs

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5634045

13 years agoimage: add package docs, rename s/UnknownFormatError/ErrFormat/ and
Nigel Tao [Mon, 6 Feb 2012 00:04:12 +0000 (11:04 +1100)]
image: add package docs, rename s/UnknownFormatError/ErrFormat/ and
rewrite the doc comment for Repeated.

Fixes #2858.

R=r, rsc
CC=golang-dev
https://golang.org/cl/5626050

13 years agodashboard: update to go1beta
Andrew Gerrand [Sun, 5 Feb 2012 22:26:32 +0000 (09:26 +1100)]
dashboard: update to go1beta

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5624056

13 years agocmd/dist: fix bug in bsubst
Alex Brainman [Sun, 5 Feb 2012 04:16:39 +0000 (15:16 +1100)]
cmd/dist: fix bug in bsubst

R=golang-dev, r, dsymonds, akumar
CC=golang-dev
https://golang.org/cl/5624054

13 years agobuild: fix sudo.bash.
David Symonds [Sun, 5 Feb 2012 03:50:38 +0000 (14:50 +1100)]
build: fix sudo.bash.

R=rsc, balasanjay, rsc
CC=golang-dev
https://golang.org/cl/5630051

13 years ago.hgignore: add VERSION.cache
Gustavo Niemeyer [Sun, 5 Feb 2012 02:36:20 +0000 (00:36 -0200)]
.hgignore: add VERSION.cache

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5627051

13 years agocmd/dist: add GOBIN to env's output
Gustavo Niemeyer [Sun, 5 Feb 2012 02:35:08 +0000 (00:35 -0200)]
cmd/dist: add GOBIN to env's output

clean.bash depends on it being set.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5630056

13 years agodoc/go1.html: style tweak for expvar notes.
David Symonds [Sat, 4 Feb 2012 10:55:38 +0000 (21:55 +1100)]
doc/go1.html: style tweak for expvar notes.

R=r
CC=golang-dev
https://golang.org/cl/5608061

13 years agounicode: document large var blocks and the SpecialCase vars.
David Symonds [Sat, 4 Feb 2012 07:35:37 +0000 (18:35 +1100)]
unicode: document large var blocks and the SpecialCase vars.

Fixes #2772.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5631047

13 years agocmd/dist: fix memory bug (fix builders?)
Russ Cox [Sat, 4 Feb 2012 07:15:53 +0000 (02:15 -0500)]
cmd/dist: fix memory bug (fix builders?)

Thanks, Valgrind!

TBR=golang-dev
CC=golang-dev
https://golang.org/cl/5630050

13 years agocmd/dist: fix arm build
Russ Cox [Sat, 4 Feb 2012 07:01:58 +0000 (02:01 -0500)]
cmd/dist: fix arm build

5l does not use the whole set of ld files
like the other linkers do.

TBR=golang-dev
CC=golang-dev
https://golang.org/cl/5629052

13 years agocmd/dist: more build fixes
Russ Cox [Sat, 4 Feb 2012 06:46:46 +0000 (01:46 -0500)]
cmd/dist: more build fixes

Flush stdout before writing to stderr, to avoid
reordering output.

Allow amd64 from uname -m (FreeBSD).

TBR=golang-dev
CC=golang-dev
https://golang.org/cl/5629051

13 years agocmd/dist: add BSD gohostos cases
Russ Cox [Sat, 4 Feb 2012 06:39:29 +0000 (01:39 -0500)]
cmd/dist: add BSD gohostos cases

Should fix FreeBSD build.

TBR=golang-dev
CC=golang-dev
https://golang.org/cl/5629050

13 years agopath/filepath: disable broken tests
Russ Cox [Sat, 4 Feb 2012 06:37:30 +0000 (01:37 -0500)]
path/filepath: disable broken tests

TBR=golang-dev
CC=golang-dev
https://golang.org/cl/5625050

13 years agocmd/dist: fix build
Russ Cox [Sat, 4 Feb 2012 06:23:54 +0000 (01:23 -0500)]
cmd/dist: fix build

TBR=golang-dev
CC=golang-dev
https://golang.org/cl/5630049

13 years agobuild: delete buildscripts, runtime scripts
Russ Cox [Sat, 4 Feb 2012 05:54:26 +0000 (00:54 -0500)]
build: delete buildscripts, runtime scripts

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

13 years agobuild: use cmd/dist
Russ Cox [Sat, 4 Feb 2012 05:54:08 +0000 (00:54 -0500)]
build: use cmd/dist

R=bradfitz, ality, r, r, iant, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5615058

13 years agobuild: dist-based build for windows
Russ Cox [Sat, 4 Feb 2012 05:48:31 +0000 (00:48 -0500)]
build: dist-based build for windows

R=golang-dev, bradfitz, iant, alex.brainman, go.peter.90
CC=golang-dev
https://golang.org/cl/5630047

13 years agocmd/dist: fix build on openbsd
Mikio Hara [Sat, 4 Feb 2012 04:27:12 +0000 (13:27 +0900)]
cmd/dist: fix build on openbsd

R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5608060

13 years agoexpvar: revise API.
David Symonds [Sat, 4 Feb 2012 03:32:05 +0000 (14:32 +1100)]
expvar: revise API.

Nuke RemoveAll from the public API.
Replace Iter functions with Do functions.

Fixes #2852.

R=rsc, r
CC=golang-dev
https://golang.org/cl/5622055

13 years agotest: fix copyright year in new test case
Ian Lance Taylor [Sat, 4 Feb 2012 01:36:48 +0000 (17:36 -0800)]
test: fix copyright year in new test case

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5631044

13 years agoreflect: test that PtrTo returns types that match program types
Ian Lance Taylor [Sat, 4 Feb 2012 01:36:25 +0000 (17:36 -0800)]
reflect: test that PtrTo returns types that match program types

The gccgo compiler was failing this test.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5631046

13 years agogo/printer: update documentation
Robert Griesemer [Sat, 4 Feb 2012 00:57:59 +0000 (16:57 -0800)]
go/printer: update documentation

Fixes #2855.

R=r
CC=golang-dev
https://golang.org/cl/5608057

13 years agotest: test method expressions with parameters, and with import
Ian Lance Taylor [Sat, 4 Feb 2012 00:38:59 +0000 (16:38 -0800)]
test: test method expressions with parameters, and with import

The gccgo compiler had two different bugs triggered by this
test case.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5606052

13 years agospec: correct primes
Christopher Wedgwood [Fri, 3 Feb 2012 23:34:31 +0000 (10:34 +1100)]
spec: correct primes

R=r
CC=golang-dev
https://golang.org/cl/5627048

13 years agocmd/dist: generate files for package runtime
Russ Cox [Fri, 3 Feb 2012 23:16:42 +0000 (18:16 -0500)]
cmd/dist: generate files for package runtime
goc2c moves here.
parallel builds like old makefiles (-j4).
add clean command.
add banner command.
implement Go version check.
real argument parsing (same as 6g etc)

Windows changes will be a separate CL.

R=golang-dev, bradfitz, iant
CC=golang-dev
https://golang.org/cl/5622058

13 years agodocs: replace references to gofix etc. with tool invocations
Rob Pike [Fri, 3 Feb 2012 20:49:51 +0000 (07:49 +1100)]
docs: replace references to gofix etc. with tool invocations

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

13 years agotest: fix bug headers
Russ Cox [Fri, 3 Feb 2012 20:22:19 +0000 (15:22 -0500)]
test: fix bug headers

The letter is $A, not $O.
($O is set accidentally, but not for long.)

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5629045

13 years agolib9/utf: make safe for automatic build
Russ Cox [Fri, 3 Feb 2012 20:19:00 +0000 (15:19 -0500)]
lib9/utf: make safe for automatic build

Add // +build ignore to mkrunetype.c,
rename runetypebody to be .h since it is #included,
delete old runetypebody tables.

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

13 years agocrypto/...: changes to address some of bug 2841.
Adam Langley [Fri, 3 Feb 2012 20:08:53 +0000 (15:08 -0500)]
crypto/...: changes to address some of bug 2841.

This change addresses a subset of the issues raised in bug 2841.

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

13 years agotools: update references to "x" to be "go tool x"
Rob Pike [Fri, 3 Feb 2012 20:03:20 +0000 (07:03 +1100)]
tools: update references to "x" to be "go tool x"
For instance, don't talk about gofix, talk about the
fix tool or "go tool fix".

R=golang-dev, rsc, r
CC=golang-dev
https://golang.org/cl/5608053

13 years agotest: don't use package main for files without a main function
Brad Fitzpatrick [Fri, 3 Feb 2012 19:43:24 +0000 (11:43 -0800)]
test: don't use package main for files without a main function

Part of issue 2833, but works fine with current test runner.

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

13 years agostrings: add Fields example
Brad Fitzpatrick [Fri, 3 Feb 2012 19:17:55 +0000 (11:17 -0800)]
strings: add Fields example

R=golang-dev, rsc, r
CC=golang-dev
https://golang.org/cl/5629043

13 years agospec: restore primality
Rob Pike [Fri, 3 Feb 2012 19:16:02 +0000 (06:16 +1100)]
spec: restore primality
9 is prime if it's a hot day.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5630043

13 years agogodoc: provide link to subdirectories, if any
Robert Griesemer [Fri, 3 Feb 2012 18:17:37 +0000 (10:17 -0800)]
godoc: provide link to subdirectories, if any

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

13 years agomath/big: more accurate package comment
Robert Griesemer [Fri, 3 Feb 2012 18:17:19 +0000 (10:17 -0800)]
math/big: more accurate package comment

Fix some receiver names for consistency.

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

13 years agogodoc: fix identifier search
Robert Griesemer [Fri, 3 Feb 2012 17:20:53 +0000 (09:20 -0800)]
godoc: fix identifier search

Thanks to Andrey Mirtchovski for tracking this down.

This was broken by CL 5528077 which removed the InsertSemis
flag from go/scanner - as a result, semicolons are now always
inserted and the respective indexer code checked for the
wrong token.

Replaced the code by a direct identifier test.

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

13 years agogodoc: diagnostic for empty FS tree
Robert Griesemer [Fri, 3 Feb 2012 16:33:29 +0000 (08:33 -0800)]
godoc: diagnostic for empty FS tree

R=adg
CC=golang-dev
https://golang.org/cl/5615055

13 years agocodereview: allow spaces in y.tab.[ch]
Russ Cox [Fri, 3 Feb 2012 15:54:05 +0000 (10:54 -0500)]
codereview: allow spaces in y.tab.[ch]

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

13 years ago5a, 6a, 8a, cc: check in y.tab.[ch]
Russ Cox [Fri, 3 Feb 2012 15:53:51 +0000 (10:53 -0500)]
5a, 6a, 8a, cc: check in y.tab.[ch]

This enables builds on systems without Bison/yacc.

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

13 years agogc: check in y.tab.[ch], yerr.h, builtin.c.
Russ Cox [Fri, 3 Feb 2012 15:53:31 +0000 (10:53 -0500)]
gc: check in y.tab.[ch], yerr.h, builtin.c.

This enables builds on systems without Bison/yacc.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5622051

13 years agospec: 9 only looks prime
Russ Cox [Fri, 3 Feb 2012 15:30:52 +0000 (10:30 -0500)]
spec: 9 only looks prime

Fixes #2870.

R=golang-dev, agl, lvd
CC=golang-dev
https://golang.org/cl/5618050

13 years agotest: add test for receiver named _
Ian Lance Taylor [Fri, 3 Feb 2012 15:19:25 +0000 (07:19 -0800)]
test: add test for receiver named _

Was miscompiled by gccgo.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5622054