1
0
mirror of https://github.com/golang/go synced 2024-11-15 10:40:35 -07:00
Commit Graph

12914 Commits

Author SHA1 Message Date
David Symonds
536be05e32 [release-branch.go1] flag: include flag name in redefinition panic.
««« backport 64a249c65d51
flag: include flag name in redefinition panic.

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

»»»
2012-06-13 16:24:14 -04:00
Brad Fitzpatrick
7de2fc41a2 [release-branch.go1] encoding/json: documentation fix
««« backport 258d7ab64d9a
encoding/json: documentation fix

Fixes #3650

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

»»»
2012-06-13 16:24:13 -04:00
Robert Griesemer
0d814d213e [release-branch.go1] go/parser: resolve all parameter types
««« backport 0a76445053e5
go/parser: resolve all parameter types

Fixes #3655.

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

»»»
2012-06-13 16:24:12 -04:00
Brad Fitzpatrick
88c11420a3 [release-branch.go1] cmd/api: add flag to specify contexts
««« backport 287685288ce1
cmd/api: add flag to specify contexts

I needed this to explore per-GOOS/GOARCH differences in pkg
syscall for a recent CL.  Others may find it useful too.

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

»»»
2012-06-13 16:24:12 -04:00
Brad Fitzpatrick
3c10f29757 [release-branch.go1] net/http: clarify ErrBodyNotAllowed error message
««« backport fe8549b7050a
net/http: clarify ErrBodyNotAllowed error message

It's usually due to writing on HEAD requests.

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

»»»
2012-06-13 16:24:11 -04:00
Brad Fitzpatrick
40960a55c3 [release-branch.go1] cmd/api: add api/next.txt
««« backport 1098c239b9ad
cmd/api: add api/next.txt

This quiets all.bash noise for upcoming features we know about.

The all.bash warnings will now only print for things not in next.txt
(or in next.txt but not in the API).

Once an API is frozen, we rename next.txt to a new frozen file
(like go1.txt)

Fixes #3651

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

»»»
2012-06-13 16:24:10 -04:00
Ugorji Nwoke
cee42ca53b [release-branch.go1] text/template: exec should accept interface value as valid.
««« backport 4c05c319570b
text/template: exec should accept interface value as valid.

Currently, if you pass some data to a template as an interface (e.g. interface{})
and extract that value that value as a parameter for a function, it fails, saying
wrong type.

This is because it is only looking at the interface type, not the interface content.

This CL uses the underlying content as the parameter to the func.

Fixes #3642.

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

»»»
2012-06-13 16:24:09 -04:00
Shenghou Ma
adb732b5fd [release-branch.go1] runtime: support conditional execution in ARM softfloat
««« backport 87ef5e0baaf5
runtime: support conditional execution in ARM softfloat
        Fixes #3638.

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

»»»
2012-06-13 16:24:08 -04:00
Russ Cox
b503008c9d [release-branch.go1] unicode: fix comment about variable types
««« backport 40104e4c312d
unicode: fix comment about variable types

In both the web and command line tool,
the comment is shown after the declaration.
But in the code the comment is obviously before.
Make the text not refer to a specific order.

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

»»»
2012-06-13 16:24:08 -04:00
Robert Griesemer
03fab00ed0 [release-branch.go1] go/ast: document CommentGroup.Text and add test case.
««« backport 3446429f1ec4
go/ast: document CommentGroup.Text and add test case.

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

»»»
2012-06-13 16:24:07 -04:00
Robert Griesemer
b7250b205a [release-branch.go1] go/parser: fix comment grouping (day 1 bug)
««« backport afbf8db1baf4
go/parser: fix comment grouping (day 1 bug)

Comment groups must end at the end of a line (or the
next non-comment token) if the group started on a line
with non-comment tokens.

This is important for correct computation of "lead"
and "line" comments (Doc and Comment fields in AST nodes).

Without this fix, the "line" comment for F1 in the
following example:

type T struct {
     F1 int // comment1
     // comment2
     F2 int
}

is "// comment1// comment2" rather than just "// comment1".

This bug was present from Day 1 but only visible when
looking at export-filtered ASTs where only comments
associated with AST nodes are printed, and only in rare
cases (e.g, in the case above, if F2 where not exported,
godoc would show "// comment2" anyway because it was
considered part of the "line" comment for F1).

The bug fix is very small (parser.go). The bulk of the
changes are additional test cases (parser_test.go).

The fix exposed a caching bug in go/printer via one of the
existing tests, hence the changes to printer.go.

As an aside, the fix removes the the need for empty lines
before an "// Output" comment for some special cases of
code examples (e.g.: src/pkg/strings/example_test.go, Count
example).

No impact on gofmt formatting of src, misc.

Fixes #3139.

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

»»»
2012-06-13 16:24:06 -04:00
Alexey Borzenkov
603ace6f8a [release-branch.go1] net/url: better parsing of urls with @ symbol in authority
««« backport 89a9ef95c8db
net/url: better parsing of urls with @ symbol in authority

Fixes #3439

R=r, rsc, dsymonds, n13m3y3r
CC=golang-dev
https://golang.org/cl/6206090

»»»
2012-06-13 16:24:05 -04:00
Adam Langley
aea18fe74b [release-branch.go1] crypto/ecdsa: fix case where p != 0 mod 8 and the hash length < p.
««« backport 465e0f78dbfe
crypto/ecdsa: fix case where p != 0 mod 8 and the hash length < p.

I made a typo which breaks P-521.

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

»»»
2012-06-13 16:24:04 -04:00
Russ Cox
eae44968e3 [release-branch.go1] crypto/rsa: add SHA-224 hash prefix
««« backport c6213d8a9118
crypto/rsa: add SHA-224 hash prefix

http://www.rsa.com/rsalabs/node.asp?id=2125:

NOTE: A new OID has been defined for the combination
of the v1.5 signature scheme and the SHA-224 hash function:
        sha224WithRSAEncryption OBJECT IDENTIFIER ::=
Like the other sha*WithRSAEncryption OIDs in PKCS #1 v2.1,
this OID has NULL parameters.
The DigestInfo encoding for SHA-224 (see Section 9.2, Note 1) is:
        (0x)30 2d 30 0d 06 09 60 86 48 01 65 03 04 02 04 05 00 04 1c || H

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

»»»
2012-06-13 16:24:03 -04:00
Brad Fitzpatrick
f5a5f17847 [release-branch.go1] net/http: fix duplicate status code in Response.Write
««« backport aad801637707
net/http: fix duplicate status code in Response.Write

Fixes #3636

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

»»»
2012-06-13 16:24:03 -04:00
Volker Dobler
6a87464709 [release-branch.go1] net/http: add cookies from jar to POST request.
««« backport 05fc2ee43b46
net/http: add cookies from jar to POST request.

The main content of this CL is a test case checking the reported
issue 3511 and a tiny fix for it.  A subsequent CL will refactor
the fix as proposed issue 3511.

Fixes #3511.

R=golang-dev, steven.hartland, bradfitz
CC=golang-dev
https://golang.org/cl/6013049

»»»
2012-06-13 16:24:02 -04:00
Brad Fitzpatrick
ed3ffb7013 [release-branch.go1] A+C: add James Gray (Individual CLA)
««« backport e7ed6a89a78e
A+C: add James Gray (Individual CLA)

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

»»»
2012-06-13 16:24:01 -04:00
Adam Langley
3d8275cc3a [release-branch.go1] A+C: b@b3k.us
««« backport f0a9aa408d21
A+C: b@b3k.us

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

»»»
2012-06-13 16:24:00 -04:00
Maxim Pimenov
8516b743a8 [release-branch.go1] go/build: fix some comments
««« backport 85e153815747
go/build: fix some comments

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

»»»
2012-06-13 16:23:59 -04:00
Andrew Gerrand
c7b02ba811 [release-branch.go1] api: undo go1.txt additions made by 27d0a516b7eb
««« backport d263b323e582
api: undo go1.txt additions made by 27d0a516b7eb

We don't change go1.txt.

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

»»»
2012-06-13 16:23:58 -04:00
Russ Cox
31ccae9af8 [release-branch.go1] cmd/go: fix typo
««« backport 9942561a3fe2
cmd/go: fix typo

Fixes #3619.

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

»»»
2012-06-13 16:23:58 -04:00
Benny Siegert
dcd49f5eaf [release-branch.go1] log: fix typo in comment
««« backport 847b8d48b873
log: fix typo in comment

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

»»»
2012-06-13 16:23:56 -04:00
Shenghou Ma
2f89bfbf8e [release-branch.go1] doc/install: document minimum system requirements
««« backport 46a117d22ce2
doc/install: document minimum system requirements
        Partly copied from CL 5685076.

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

»»»
2012-06-13 16:23:56 -04:00
Russ Cox
0c2ee38a0a [release-branch.go1] cmd/go: invoke godoc with import path when possible
««« backport 5b1e024a5e89
cmd/go: invoke godoc with import path when possible
Also add -n -x flags to doc, fmt, vet.
Also shorten unknown command error.

Fixes #3612.
Fixes #3613.

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

»»»
2012-06-13 16:23:54 -04:00
Russ Cox
9fdd043517 [release-branch.go1] cmd/gc: make append(nil, x) error more precise
««« backport 4732bf6f874f
cmd/gc: make append(nil, x) error more precise

Before:
./x.go:6: first argument to append must be slice; have nil

After:
./x.go:6: first argument to append must be typed slice; have untyped nil

Fixes #3616.

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

»»»
2012-06-13 16:23:54 -04:00
Jan Ziak
fd2dfebd88 [release-branch.go1] runtime: fix counting of free objects
««« backport 393bec50494e
runtime: fix counting of free objects

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

»»»
2012-06-13 16:23:53 -04:00
Brad Fitzpatrick
bd0227bbec [release-branch.go1] mime/multipart: fix handling of empty parts without CRLF before next part
««« backport 32a8b0e41031
mime/multipart: fix handling of empty parts without CRLF before next part

Empty parts can be either of the form:

a) "--separator\r\n", header (w/ trailing 2xCRLF), \r\n "--separator"...
or
b) "--separator\r\n", header (w/ trailing 2xCRLF), "--separator"...

We never handled case b).  In fact the RFC seems kinda vague about
it, but browsers seem to do a), and App Engine's synthetic POST
bodies after blob uploads is of form b).

So handle them both, and add a bunch of tests.

(I can't promise these are the last fixes to multipart, especially
considering its history, but I'm growing increasingly confident at
least, and I've never submitted a multipart CL with known bugs
outstanding, including this time.)

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

»»»
2012-06-13 16:23:52 -04:00
Jan Mercl
ff5f88f214 [release-branch.go1] regexp/syntax: replace internal error on unexpected ) w/ ErrUnexpectedParen
««« backport 27d0a516b7eb
regexp/syntax: replace internal error on unexpected ) w/ ErrUnexpectedParen

Unbalanced extra right parenthesis produced an internal error instead of
a more descriptive one.

Fixes #3406.

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

»»»
2012-06-13 16:23:51 -04:00
Michael Gehring
dc2889c57e [release-branch.go1] crypto/tls: fix decoding of certLen in certificateMsg.unmarshal
««« backport bcfa9fc88361
crypto/tls: fix decoding of certLen in certificateMsg.unmarshal

certLen was decoded incorrectly if length > 2^16-1.

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

»»»
2012-06-13 16:23:50 -04:00
Adam Langley
237b087af6 [release-branch.go1] A+C: add Michael Gehring (individual CLA)
««« backport 086b6525aea6
A+C: add Michael Gehring (individual CLA)

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

»»»
2012-06-13 16:23:49 -04:00
David Symonds
aceb23ef83 [release-branch.go1] A+C: Jan Ziak (individual CLA)
««« backport c6edd5218579
A+C: Jan Ziak (individual CLA)

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

»»»
2012-06-13 16:23:48 -04:00
Francisco Souza
52b822298e [release-branch.go1] cmd/go: fix remote help reference to "go help packages"
««« backport adc987ffdd99
cmd/go: fix remote help reference to "go help packages"

go help remote used to reference "go help importpath", which has
changed to "go help packages".

Fixes #3598.

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

»»»
2012-06-13 16:23:48 -04:00
Nigel Tao
a53a74c204 [release-branch.go1] go: fix the import path "./..." not matching ".".
««« backport cdd1fa20bb08
go: fix the import path "./..." not matching ".".

Tested manually.

Fixes #3554.

Before:
$ cd $GOROOT/src/pkg
$ go list io
io
$ go list io/...
io
io/ioutil
$ cd $GOROOT/src/pkg/io
$ go list .
io
$ go list ./...
io/ioutil

After:
$ cd $GOROOT/src/pkg
$ go list io
io
$ go list io/...
io
io/ioutil
$ cd $GOROOT/src/pkg/io
$ go list .
io
$ go list ./...
io
io/ioutil
$ go list ././...
io
io/ioutil
$ go list ././.././io/...
io
io/ioutil
$ go list ../image
image
$ go list ../image/...
image
image/color
image/draw
image/gif
image/jpeg
image/png
$ go list ../.../template
html/template
text/template
$ cd $GOROOT/src/pkg
$ go list ./io
io
$ go list ./io/...
io
io/ioutil
$ go list ./.../pprof
net/http/pprof
runtime/pprof
$ go list ./compress
can't load package: package compress: no Go source files in /home/nigeltao/go/src/pkg/compress
$ go list ./compress/...
compress/bzip2
compress/flate
compress/gzip
compress/lzw
compress/zlib
$ cd $GOROOT/src/pkg/code.google.com
$ go list ./p/leveldb-go/...
code.google.com/p/leveldb-go/leveldb
code.google.com/p/leveldb-go/leveldb/crc
code.google.com/p/leveldb-go/leveldb/db
code.google.com/p/leveldb-go/leveldb/memdb
code.google.com/p/leveldb-go/leveldb/memfs
code.google.com/p/leveldb-go/leveldb/record
code.google.com/p/leveldb-go/leveldb/table
code.google.com/p/leveldb-go/manualtest/filelock
$ go list ./p/.../truetype
code.google.com/p/freetype-go/example/truetype
code.google.com/p/freetype-go/freetype/truetype
$ go list ./p/.../example
warning: "./p/.../example" matched no packages
$ go list ./p/.../example/...
code.google.com/p/freetype-go/example/freetype
code.google.com/p/freetype-go/example/gamma
code.google.com/p/freetype-go/example/raster
code.google.com/p/freetype-go/example/round
code.google.com/p/freetype-go/example/truetype
code.google.com/p/x-go-binding/example/imgview
code.google.com/p/x-go-binding/example/xgb

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

»»»
2012-06-13 16:23:47 -04:00
Russ Cox
87372e839e [release-branch.go1] crypto/aes: fix comment
««« backport d4f7f7438d1f
crypto/aes: fix comment

Fixes #3589.

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

»»»
2012-06-13 16:23:46 -04:00
Jean-Marc Eurin
a340c2a131 [release-branch.go1] misc/emacs: Restore the window position after a successful gofmt.
««« backport 9d6693456f93
misc/emacs: Restore the window position after a successful gofmt.

This adds restoring the window position so that the buffer doesn't jump around after the erase/copy.

R=sameer
CC=golang-dev
https://golang.org/cl/5981055

»»»
2012-06-13 16:23:45 -04:00
Sameer Ajmani
1927afba99 [release-branch.go1] C: correct entry: jmeurin, not jme.
««« backport 726c57a92c5d
C: correct entry: jmeurin, not jme.

R=golang-dev, rsc
CC=golang-dev, jme, jmeurin
https://golang.org/cl/6192057

»»»
2012-06-13 16:23:44 -04:00
Sameer Ajmani
cc52fe30c1 [release-branch.go1] C: Jeremy Ellington (Google CLA)
««« backport 448f98d1af28
C: Jeremy Ellington (Google CLA)

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

»»»
2012-06-13 16:23:43 -04:00
Shenghou Ma
c60564f59b [release-branch.go1] runtime: fix c compiler warning
««« backport e388ce51be75
runtime: fix c compiler warning

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

»»»
2012-06-13 16:23:43 -04:00
Rémy Oudompheng
778529bd58 [release-branch.go1] math/big: fix superpolynomial complexity in Karatsuba algorithm.
««« backport 7873186d5774
math/big: fix superpolynomial complexity in Karatsuba algorithm.

benchmark                     old ns/op    new ns/op    delta
BenchmarkExp3Power0x10              732          734   +0.27%
BenchmarkExp3Power0x40              834          836   +0.24%
BenchmarkExp3Power0x100            1600         1579   -1.31%
BenchmarkExp3Power0x400            3478         3417   -1.75%
BenchmarkExp3Power0x1000          19388        19229   -0.82%
BenchmarkExp3Power0x4000         160274       156881   -2.12%
BenchmarkExp3Power0x10000       1552050      1372058  -11.60%
BenchmarkExp3Power0x40000      27328710     15216920  -44.32%
BenchmarkExp3Power0x100000    612349000    131407100  -78.54%
BenchmarkExp3Power0x400000  44073524000   1122195000  -97.45%

R=golang-dev, mtj, gri, rsc
CC=golang-dev, remy
https://golang.org/cl/6176043

»»»
2012-06-13 16:23:42 -04:00
Michael Chaten
3cbadbd631 [release-branch.go1] encoding/json: Fix panic when trying to unmarshal the empty string into an integer
««« backport 7ee60b35f644
encoding/json: Fix panic when trying to unmarshal the empty string into an integer

Fixes #3450.

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

»»»
2012-06-13 16:23:41 -04:00
Adam Langley
5ccc50c8d6 [release-branch.go1] crypto/x509: fix panic when using unavailable hash function.
««« backport d8d358ddc6e0
crypto/x509: fix panic when using unavailable hash function.

crypto.Hash.New() changed to panicking when the hash function isn't
linked in, but crypto/x509 still expects it to return nil.

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

»»»
2012-06-13 16:23:40 -04:00
Shenghou Ma
fcfedc0117 [release-branch.go1] cmd/dist: remove stray src/pkg/runtime/z* when cleaning
««« backport 26fc3f8aa53e
cmd/dist: remove stray src/pkg/runtime/z* when cleaning

R=golang-dev, bradfitz, dave, rsc, lstoakes, rsc
CC=golang-dev
https://golang.org/cl/6180044

»»»
2012-06-13 16:23:39 -04:00
Ian Lance Taylor
c08ef1339e [release-branch.go1] cgo: rename C names for Go types to avoid conflicting with package
««« backport d063a7844d48
cgo: rename C names for Go types to avoid conflicting with package

Fixes #3371.

R=rsc, bsiegert, r, mtj, iant
CC=golang-dev
https://golang.org/cl/6131060

»»»
2012-06-13 16:23:38 -04:00
Robert Hencke
db26f2a473 [release-branch.go1] cmd/go: do not ignore DepsErrors in 'go run'
««« backport 1d4d8324085b
cmd/go: do not ignore DepsErrors in 'go run'

Fixes #3490.

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

»»»
2012-06-13 16:23:38 -04:00
Brad Fitzpatrick
7a4e18dbe6 [release-branch.go1] encoding/base64: don't ignore underlying souce read error in decode
««« backport 69c9477136d3
encoding/base64: don't ignore underlying souce read error in decode

Fixes #3577

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

»»»
2012-06-13 16:23:37 -04:00
Brian Dellisanti
43f2be4f4b [release-branch.go1] os/exec: close all internal descriptors when Cmd.Start() fails.
««« backport 9d046474e95a
os/exec: close all internal descriptors when Cmd.Start() fails.

This closes any internal descriptors (pipes, etc) that Cmd.Start() had
opened before it failed.

Fixes #3468.

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

»»»
2012-06-13 16:23:36 -04:00
Ian Lance Taylor
2555bbfdd8 [release-branch.go1] A+C: add Brian Dellisanti (individual CLA)
««« backport f63da4c9c6d7
A+C: add Brian Dellisanti (individual CLA)

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

»»»
2012-06-13 16:23:35 -04:00
Anthony Martin
0b4c5d7946 [release-branch.go1] path/filepath: fix typo
««« backport 6c742b3b04d1
path/filepath: fix typo

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

»»»
2012-06-13 16:23:33 -04:00
Dave Cheney
3a3d8826b4 [release-branch.go1] lib9: fix warning under clang 3.1
««« backport 73a10f76098b
lib9: fix warning under clang 3.1

Fixes #3534.

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

»»»
2012-06-13 16:23:32 -04:00
Shenghou Ma
ec1cbabbac [release-branch.go1] syscall: support Getpid() on Windows
««« backport 6436d0889d29
syscall: support Getpid() on Windows
        Fixes #3379.

R=golang-dev, alex.brainman, rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5909043

»»»
2012-06-13 16:23:31 -04:00