]> Cypherpunks repositories - gostls13.git/log
gostls13.git
13 years agotemplate: fix quote-handling with formatters
Gustavo Niemeyer [Sun, 29 May 2011 03:23:32 +0000 (00:23 -0300)]
template: fix quote-handling with formatters

Fixes issue #1896.

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

13 years agoos: fix os.MkdirAll with backslash path separator.
Yasuhiro Matsumoto [Sun, 29 May 2011 03:03:49 +0000 (13:03 +1000)]
os: fix os.MkdirAll with backslash path separator.
MkdirAll() need to use isSeparator().
Move primary defines of filepath.Separator/filepath.ListSeparator
 to os.PathSeparator/os.PathListSeparator.
Move filepath.isSeparator() to os.IsPathSeparator().
filepath package refer them from os package.
Fixes #1831.

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

13 years agoos: fix windows version of Readdir(0)
Alex Brainman [Sun, 29 May 2011 01:59:35 +0000 (11:59 +1000)]
os: fix windows version of Readdir(0)

Fixes #1893.

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

13 years agogotest, pkg/exec: use bash instead of sh to execute shell scripts on windows
Alex Brainman [Sat, 28 May 2011 11:26:03 +0000 (21:26 +1000)]
gotest, pkg/exec: use bash instead of sh to execute shell scripts on windows

As suggested by dho, iant2.

R=golang-dev, rsc
CC=devon.odell, golang-dev, iant
https://golang.org/cl/4515147

13 years agogo/scanner: don't allow "0x" and "0X" as integers
Evan Shaw [Fri, 27 May 2011 23:47:26 +0000 (16:47 -0700)]
go/scanner: don't allow "0x" and "0X" as integers

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

13 years agohttp: client+server benchmark
Brad Fitzpatrick [Fri, 27 May 2011 23:43:02 +0000 (16:43 -0700)]
http: client+server benchmark

baseline runs: (6g, gopher.mtv)

http_test.BenchmarkClientServer  5000  412588 ns/op
http_test.BenchmarkClientServer  5000  403346 ns/op
http_test.BenchmarkClientServer  5000  413936 ns/op
http_test.BenchmarkClientServer  5000  410287 ns/op
http_test.BenchmarkClientServer  5000  388037 ns/op
http_test.BenchmarkClientServer  5000  405545 ns/op
http_test.BenchmarkClientServer  5000  405179 ns/op
http_test.BenchmarkClientServer  5000  413827 ns/op
http_test.BenchmarkClientServer  5000  392723 ns/op

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

13 years agoencoding/binary: add a non-reflect fast path for Write
Brad Fitzpatrick [Fri, 27 May 2011 23:29:33 +0000 (16:29 -0700)]
encoding/binary: add a non-reflect fast path for Write

before/after:
binary.BenchmarkWrite   100000      18312 ns/op
binary.BenchmarkWrite   500000       4468 ns/op

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

13 years agobig: make Int and Rat implement fmt.Scanner
Evan Shaw [Fri, 27 May 2011 22:51:00 +0000 (15:51 -0700)]
big: make Int and Rat implement fmt.Scanner

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

13 years agotime: midnight is 12AM.
Rob Pike [Fri, 27 May 2011 21:06:53 +0000 (07:06 +1000)]
time: midnight is 12AM.
This is the other half of the problem fixed at noon by the previous change.

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

13 years agoos: yet more Readdir tests and fix earlier regression
Brad Fitzpatrick [Fri, 27 May 2011 19:58:59 +0000 (12:58 -0700)]
os: yet more Readdir tests and fix earlier regression

R=golang-dev, fshahriar
CC=golang-dev
https://golang.org/cl/4548068

13 years agoos: improve Readdir test coverage, fix Readdir(0) on EOF
Brad Fitzpatrick [Fri, 27 May 2011 19:14:48 +0000 (12:14 -0700)]
os: improve Readdir test coverage, fix Readdir(0) on EOF

Adds tests for Readdir and Readdirnames with different n
values.  No good way to inject faults during full reads,
though.

Also fixes bug report from fshahriar:
Readdir(0) wasn't behaving like Readdir(-1).

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

13 years agohttp: propagate Set-Cookie in reverse proxy
Brad Fitzpatrick [Fri, 27 May 2011 18:06:53 +0000 (11:06 -0700)]
http: propagate Set-Cookie in reverse proxy

Also adds Host header tests.

Fixes #1886

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

13 years agohttp/spdy: temporarily disable some failing tests
Brad Fitzpatrick [Fri, 27 May 2011 17:08:31 +0000 (10:08 -0700)]
http/spdy: temporarily disable some failing tests

Issue 1886 has details

R=golang-dev, willchan
CC=golang-dev
https://golang.org/cl/4527083

13 years agotime: fix Format bug: noon is 12PM, not 0PM.
Rob Pike [Fri, 27 May 2011 13:24:39 +0000 (23:24 +1000)]
time: fix Format bug: noon is 12PM, not 0PM.
Fixes #1882.

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

13 years agocgo: restrict #cgo directives to prevent shell expansion
Gustavo Niemeyer [Fri, 27 May 2011 11:46:51 +0000 (08:46 -0300)]
cgo: restrict #cgo directives to prevent shell expansion

Fixes issue #1879.

Directives were not directly expanded, but since their
content ended up in makefiles, further expansion would
take place there.  This prevents such artifacts by
restricting the set of characters that may be used in
a directive value.

To build the list of safe characters I went through the
contents of /usr/lib/pkgconfig and extracted LDFLAGS
and CFLAGS information, so hopefully this is a
reasonable default to get started.

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

13 years agocrypto/tls/generate_cert.go: fix misspelling of O_CREATE.
Rob Pike [Fri, 27 May 2011 11:06:50 +0000 (21:06 +1000)]
crypto/tls/generate_cert.go: fix misspelling of O_CREATE.
Fixes #1888.

R=ken
CC=golang-dev
https://golang.org/cl/4515148

13 years agoos: another attempt to handle OpenFile flag parameter properly on Windows
Alex Brainman [Fri, 27 May 2011 07:02:24 +0000 (17:02 +1000)]
os: another attempt to handle OpenFile flag parameter properly on Windows

Fixes #1791.

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

13 years agodoc: put Release History link on 'Documentation' page
Andrew Gerrand [Fri, 27 May 2011 06:07:30 +0000 (16:07 +1000)]
doc: put Release History link on 'Documentation' page
Also put Weekly Snapshot History link on 'Contributing' page

Fixes #1885.

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

13 years agoruntime: fix mmap error return on linux.
Dmitry Chestnykh [Fri, 27 May 2011 04:43:27 +0000 (21:43 -0700)]
runtime: fix mmap error return on linux.

Fixes #1511 again.

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

13 years agocgo: support pkg-config for flags and libs
Gustavo Niemeyer [Fri, 27 May 2011 01:19:23 +0000 (22:19 -0300)]
cgo: support pkg-config for flags and libs

Fixes issue #1853.

R=golang-dev, mattn.jp, adg
CC=golang-dev
https://golang.org/cl/4550084

13 years agosyscall: add routing messages support for BSD variants
Mikio Hara [Fri, 27 May 2011 00:02:03 +0000 (20:02 -0400)]
syscall: add routing messages support for BSD variants

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

13 years agoos: TestMkdirAll should not fail to delete _test/_TestMkdirAll_ on Windows
Alex Brainman [Thu, 26 May 2011 23:52:15 +0000 (09:52 +1000)]
os: TestMkdirAll should not fail to delete _test/_TestMkdirAll_ on Windows

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

13 years agosyscall: add routing messages support for Linux
Mikio Hara [Thu, 26 May 2011 21:04:58 +0000 (17:04 -0400)]
syscall: add routing messages support for Linux

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

13 years agocompress/flate: fix Huffman tree bug
Ivan Krasin [Thu, 26 May 2011 21:02:11 +0000 (17:02 -0400)]
compress/flate: fix Huffman tree bug
Incorporate refactoring and a regression test from https://golang.org/cl/4538090/

R=rsc, go.peter.90, imkrasin
CC=golang-dev, mirtchovski
https://golang.org/cl/4524070

13 years agofix build: temporarily disable the use of strings.Reader UnreadRune in fmt
Robert Griesemer [Thu, 26 May 2011 18:54:10 +0000 (11:54 -0700)]
fix build: temporarily disable the use of strings.Reader UnreadRune in fmt

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

13 years agogc: patch y.tab.c to fix build when using Bison 2.5
Ian Lance Taylor [Thu, 26 May 2011 18:28:23 +0000 (11:28 -0700)]
gc: patch y.tab.c to fix build when using Bison 2.5

Fixes #1843.

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

13 years agoio: add ByteScanner, RuneScanner interfaces
Robert Griesemer [Thu, 26 May 2011 18:03:52 +0000 (11:03 -0700)]
io: add ByteScanner, RuneScanner interfaces

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

13 years agostrings: implement UnreadByte, UnreadRune
Robert Griesemer [Thu, 26 May 2011 18:02:07 +0000 (11:02 -0700)]
strings: implement UnreadByte, UnreadRune

Added corresponding tests.

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

13 years agohttp/spdy: redo interfaces, flesh out implementation & frame types
William Chan [Thu, 26 May 2011 16:54:54 +0000 (09:54 -0700)]
http/spdy: redo interfaces, flesh out implementation & frame types

Added a new Framer to handle reading/writing Frames. This is necessary since we have to maintain a compression context across streams.

TODO:
* Separate the types and read/write routines into different files.
* Improve error handling.

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

13 years agoCONTRIBUTORS: add William Chan (Google CLA)
Brad Fitzpatrick [Thu, 26 May 2011 16:53:28 +0000 (09:53 -0700)]
CONTRIBUTORS: add William Chan (Google CLA)

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

13 years agoencoding/binary: add a non-reflect fast path for Read
Brad Fitzpatrick [Thu, 26 May 2011 16:01:05 +0000 (09:01 -0700)]
encoding/binary: add a non-reflect fast path for Read

before/after:
binary.BenchmarkRead  200000     10860 ns/op
binary.BenchmarkRead  500000      2846 ns/op

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

13 years agoexp/eval: fix compile error.
Yasuhiro Matsumoto [Thu, 26 May 2011 12:05:25 +0000 (22:05 +1000)]
exp/eval: fix compile error.

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

13 years agomime/multipart: misc code/doc fixes
Brad Fitzpatrick [Thu, 26 May 2011 02:21:05 +0000 (19:21 -0700)]
mime/multipart: misc code/doc fixes

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

13 years agohttp: Transport hook to register non-http(s) protocols
Brad Fitzpatrick [Wed, 25 May 2011 19:31:11 +0000 (12:31 -0700)]
http: Transport hook to register non-http(s) protocols

This permits external packages implementing e.g.
FTP or gopher to register themselves with the
http.DefaultClient:

package ftp
func init() {
    http.DefaultTransport.RegisterProtocol("ftp", &ftp{})
}

Client code would look like:

import (
    _ "github.com/exampleuser/go/gopher"
    _ "github.com/exampleuser/go/ftp"
)

func main() {
    resp, err := http.Get("ftp://example.com/path.txt")
    ...
}

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

13 years agoencoding/base64: add DecodeString and EncodeToString
Brad Fitzpatrick [Wed, 25 May 2011 19:24:36 +0000 (12:24 -0700)]
encoding/base64: add DecodeString and EncodeToString

... like encoding/hex. Same signatures.

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

13 years agonet: If we stop polling, remove any pending events for the socket
Ian Lance Taylor [Wed, 25 May 2011 19:21:10 +0000 (12:21 -0700)]
net: If we stop polling, remove any pending events for the socket

Fixes #1872.

R=rsc
CC=golang-dev, lars.pensjo
https://golang.org/cl/4559046

13 years agogo/scanner: use strconv.QuoteRune now that it is available
Robert Griesemer [Wed, 25 May 2011 18:16:17 +0000 (11:16 -0700)]
go/scanner: use strconv.QuoteRune now that it is available

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

13 years agotest: test cases for issue 1708.
Robert Griesemer [Wed, 25 May 2011 17:26:06 +0000 (10:26 -0700)]
test: test cases for issue 1708.

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

13 years agoquietgcc: fix typo, respect $TMPDIR
Russ Cox [Wed, 25 May 2011 17:20:50 +0000 (13:20 -0400)]
quietgcc: fix typo, respect $TMPDIR

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

13 years agoio, net, http: sendfile support
Brad Fitzpatrick [Wed, 25 May 2011 17:15:26 +0000 (10:15 -0700)]
io, net, http: sendfile support

Speeds up static fileserver, avoiding kernel/userspace copies.

Numbers: downloading 14 MB AppEngine Go SDK with ab (Apache Bench)
with 5 threads:

Before/after numbers:

CPU:
user    0m3.910s
sys     0m23.650s
->
user    0m0.720s
sys     0m4.890s

Time taken for tests:   8.906 seconds
->
Time taken for tests:   8.545 seconds

Percentage of the requests served within a certain time (ms)
50%     44
66%     45
75%     46
80%     46
90%     48
95%     51
98%     59
99%     71
100     74 (longest request)
->
50%     42
66%     43
75%     43
80%     44
90%     46
95%     57
98%     62
99%     63
100%    64 (longest request)

R=iant, gary.burd, rsc, bradfitz
CC=golang-dev
https://golang.org/cl/4543071

13 years agogc: typo
Russ Cox [Wed, 25 May 2011 14:19:50 +0000 (10:19 -0400)]
gc: typo

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

13 years ago5g: alignment fixes
Russ Cox [Wed, 25 May 2011 14:18:49 +0000 (10:18 -0400)]
5g: alignment fixes

Makes all.bash work after echo 4 >/proc/cpu/alignment,
which means kill the process on an unaligned access.

The default behavior on DreamPlug/GuruPlug/SheevaPlug
is to simulate an ARMv3 and just let the unaligned accesses
stop at the word boundary, resulting in all kinds of surprises.

Fixes #1240.

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

13 years ago5l: fix build
Russ Cox [Wed, 25 May 2011 13:44:05 +0000 (09:44 -0400)]
5l: fix build

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

13 years agold: add -w to disable dwarf, make errors obviously from dwarf
Russ Cox [Wed, 25 May 2011 12:25:33 +0000 (08:25 -0400)]
ld: add -w to disable dwarf, make errors obviously from dwarf

Reenable dwarf output on Mac.
Was writing headers but no actual dwarf data.

Fixes #1877 (accidentally).
Workaround for issue 1878.

R=lvd
CC=golang-dev
https://golang.org/cl/4515139

13 years ago8l: emit resources (.rsrc) in Windows PE.
Wei Guangjing [Wed, 25 May 2011 11:53:00 +0000 (07:53 -0400)]
8l: emit resources (.rsrc) in Windows PE.

R=alex.brainman, rsc
CC=golang-dev, vcc.163
https://golang.org/cl/4516055

13 years agofmt: make %q work for integers, printing a quoted character literal.
Rob Pike [Wed, 25 May 2011 11:25:15 +0000 (21:25 +1000)]
fmt: make %q work for integers, printing a quoted character literal.

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

13 years agoos: Fix test to work on Solaris.
Ian Lance Taylor [Wed, 25 May 2011 05:53:37 +0000 (22:53 -0700)]
os: Fix test to work on Solaris.

On Solaris /bin is a symlink to /usr/bin, so running "pwd" in
the directory "/bin" prints out "/usr/bin".

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

13 years agostrconv: add QuoteRune, which is analogous to Quote, but for runes rather than strings.
Rob Pike [Wed, 25 May 2011 05:04:07 +0000 (15:04 +1000)]
strconv: add QuoteRune, which is analogous to Quote, but for runes rather than strings.

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

13 years agodoc: mention go/printer instead of container/vector in effective go
Andrew Gerrand [Wed, 25 May 2011 01:39:40 +0000 (11:39 +1000)]
doc: mention go/printer instead of container/vector in effective go

Fixes #1876.

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

13 years agospec: delete spurious tag.
Rob Pike [Wed, 25 May 2011 00:58:58 +0000 (10:58 +1000)]
spec: delete spurious tag.

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

13 years ago6l, 8l: fix Mach-O binaries with many dynamic libraries
Russ Cox [Tue, 24 May 2011 23:50:13 +0000 (19:50 -0400)]
6l, 8l: fix Mach-O binaries with many dynamic libraries

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

13 years agogc: relax assignability of method receivers
Anthony Martin [Tue, 24 May 2011 23:48:19 +0000 (19:48 -0400)]
gc: relax assignability of method receivers

The spec was adjusted in commit df410d6a4842 to allow the
implicit assignment of strutures with unexported fields in
method receivers.  This change updates the compiler.

Also moved bug322 into fixedbugs and updated golden.out
to reflect the removal of the last known bug.

Fixes #1402.

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

13 years agogo/scanner: remove some code
Robert Griesemer [Tue, 24 May 2011 22:00:42 +0000 (15:00 -0700)]
go/scanner: remove some code

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

13 years agogo spec: be precise with the use of the informal ellipsis … and the Go token ...
Robert Griesemer [Tue, 24 May 2011 21:18:44 +0000 (14:18 -0700)]
go spec: be precise with the use of the informal ellipsis  … and the Go token ...

Fixes #1867.

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

13 years agodocs: remove some prose-unworthy empty parentheses.
Rob Pike [Tue, 24 May 2011 20:44:09 +0000 (06:44 +1000)]
docs: remove some prose-unworthy empty parentheses.
In our evolving style, prose should name a function "f" not "f()".

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

13 years agospec: add missing comma.
Rob Pike [Tue, 24 May 2011 20:00:07 +0000 (06:00 +1000)]
spec: add missing comma.
A real humdinger.

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

13 years agohttp: Client test for streaming responses (no code changes)
Brad Fitzpatrick [Tue, 24 May 2011 16:02:01 +0000 (09:02 -0700)]
http: Client test for streaming responses (no code changes)

I had a report that this was broken. It seems fine.

I think the reporter was just never flushing their response
headers.  If I omit the test server's initial Flush I get the
same behavior as reported. (a hang at Client.Get)

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

13 years agohttp: fix Set-Cookie date parsing
Brad Fitzpatrick [Tue, 24 May 2011 15:31:43 +0000 (08:31 -0700)]
http: fix Set-Cookie date parsing

Fixes #1855

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

13 years agoencoding/line: delete package.
Rob Pike [Tue, 24 May 2011 06:05:26 +0000 (16:05 +1000)]
encoding/line: delete package.
Its functionality is now in bufio.
Fixes #1869.

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

13 years agogodoc: display advert for the package dashboard on package list page
Andrew Gerrand [Tue, 24 May 2011 05:45:08 +0000 (15:45 +1000)]
godoc: display advert for the package dashboard on package list page

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

13 years agomisc/emacs: don't select the mark after gofmt
Eric Eisner [Tue, 24 May 2011 02:47:25 +0000 (22:47 -0400)]
misc/emacs: don't select the mark after gofmt

R=ajmani
CC=golang-dev
https://golang.org/cl/4553054

13 years agoimage/gif: simplify blockReader.Read.
Rob Pike [Tue, 24 May 2011 01:02:44 +0000 (11:02 +1000)]
image/gif: simplify blockReader.Read.
Inverting the tests avoids recursion and simplifies the flow.

R=nigeltao
CC=golang-dev
https://golang.org/cl/4551057

13 years agogophertool: also accept commit form 8486:ab29d2698a47
Brad Fitzpatrick [Mon, 23 May 2011 21:27:51 +0000 (14:27 -0700)]
gophertool: also accept commit form 8486:ab29d2698a47

... as "hg log" produces by default.

And add a README.

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

13 years agogo spec: clarify rules for shifts
Robert Griesemer [Mon, 23 May 2011 21:12:42 +0000 (14:12 -0700)]
go spec: clarify rules for shifts

Note: This is not a spec change.

The spec was not clear on the result type of
constant shift expressions. Made it more
explicit and added additional examples.

Also: Remove paragraph on send expressions (they
are statements, now).

Fixes #1708.

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

13 years agogophertool: Chrome extension to aid in Go development
Brad Fitzpatrick [Mon, 23 May 2011 21:05:18 +0000 (14:05 -0700)]
gophertool: Chrome extension to aid in Go development

Contains common links & a smart text box that recognizes various
identifiers and jumps to one of:

* issue URL,
* codereview URL,
* commit URL,
* package docs

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

13 years agotime: Remove unnecessary call to Nanoseconds() in after().
Kyle Consalus [Mon, 23 May 2011 19:38:51 +0000 (12:38 -0700)]
time: Remove unnecessary call to Nanoseconds() in after().

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

13 years agotag weekly.2011-05-22
Andrew Gerrand [Mon, 23 May 2011 06:32:58 +0000 (16:32 +1000)]
tag weekly.2011-05-22

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

13 years agoweekly.2011-05-22 weekly.2011-05-22
Andrew Gerrand [Mon, 23 May 2011 06:30:06 +0000 (16:30 +1000)]
weekly.2011-05-22

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

13 years agohttp: add docs/warning on incorrect use of NewChunkedWriter
Brad Fitzpatrick [Mon, 23 May 2011 01:46:48 +0000 (18:46 -0700)]
http: add docs/warning on incorrect use of NewChunkedWriter

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

13 years agosyscall: add IPv6 scope zone ID support
Mikio Hara [Sun, 22 May 2011 17:09:07 +0000 (10:09 -0700)]
syscall: add IPv6 scope zone ID support

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

13 years agonet: re-enable wildcard listening
Mikio Hara [Sun, 22 May 2011 16:48:04 +0000 (09:48 -0700)]
net: re-enable wildcard listening

Fixes #1854.

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

13 years agoruntime: fix function args not checked warning on arm
Dave Cheney [Sun, 22 May 2011 04:59:25 +0000 (14:59 +1000)]
runtime: fix function args not checked warning on arm

This tiny nit was driving me nuts

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

13 years agodoc: close paragraph tags in FAQ
Evan Shaw [Sun, 22 May 2011 04:56:12 +0000 (14:56 +1000)]
doc: close paragraph tags in FAQ

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

13 years agoflag: fix build
Andrew Gerrand [Sun, 22 May 2011 01:55:02 +0000 (11:55 +1000)]
flag: fix build

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

13 years agocrypto/x509: fix incorrect prints found by govet
Robert Hencke [Sat, 21 May 2011 23:23:22 +0000 (09:23 +1000)]
crypto/x509: fix incorrect prints found by govet

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

13 years agoflags: allow distinct sets of flags.
Rob Pike [Sat, 21 May 2011 23:22:00 +0000 (09:22 +1000)]
flags: allow distinct sets of flags.

A FlagSet is an independent set of flags that may be used,
for example, to provide flag processing for subcommands
in a CLI.  The standard, os.Args-derived set of flags is a
global but non-exported FlagSet and the standard functions
are wrappers for methods of that FlagSet.

Allow the programmer to control whether the program
exits if there is a parse error.  For the default set, the behavior
remains to exit on error.

The handling of Usage is odd due to backward compatibility.

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

13 years ago5l: fix set but not used warnings
Dave Cheney [Sat, 21 May 2011 15:00:53 +0000 (08:00 -0700)]
5l: fix set but not used warnings

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

13 years agohttp: include Host header in requests, even with proxies
Brad Fitzpatrick [Sat, 21 May 2011 02:40:23 +0000 (19:40 -0700)]
http: include Host header in requests, even with proxies

A user pointed out that Go didn't work with their
corp proxy, always throwing 400 Bad Request errors.

Looking at the RFC 2616, Host is always required,
even with proxies.

The old code assumed that writing an absolute URL
in the first line of an HTTP request implied
that the Host header was no longer necessary.

Double-checked behavior with curl.

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

13 years agofmt: scanning doc fix
Evan Shaw [Fri, 20 May 2011 21:38:01 +0000 (07:38 +1000)]
fmt: scanning doc fix

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

13 years agosyscall: sendfile
Brad Fitzpatrick [Fri, 20 May 2011 18:51:31 +0000 (11:51 -0700)]
syscall: sendfile

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

13 years agomisc: syntax highlighting support on IntelliJ IDEA
Alexander Orlov [Fri, 20 May 2011 18:03:33 +0000 (11:03 -0700)]
misc: syntax highlighting support on IntelliJ IDEA

Go keywords from Vim's syntax configuration file were used.
Issue Tracker Reference: http://code.google.com/p/go/issues/detail?id=1850

Fixes #1850.

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

13 years agoasn1: add big support.
Adam Langley [Fri, 20 May 2011 17:20:08 +0000 (10:20 -0700)]
asn1: add big support.

Initially I wanted to minimise dependencies but it's become clear that
big int support in ASN.1 is a common need and that it should be part
of the core.

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

13 years agocrypto/openpgp: add key generation support.
Adam Langley [Fri, 20 May 2011 16:36:20 +0000 (09:36 -0700)]
crypto/openpgp: add key generation support.

This change adds a function for generating new Entities and inchoate
support for reserialising Entities.

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

13 years agomime/multipart: add a multipart Writer
Brad Fitzpatrick [Fri, 20 May 2011 16:03:43 +0000 (09:03 -0700)]
mime/multipart: add a multipart Writer

Fixes #1823

R=golang-dev, adg, robert.hencke
CC=golang-dev
https://golang.org/cl/4530054

13 years agogodoc: remove paragraph tags around navigation div
Andrew Gerrand [Fri, 20 May 2011 05:32:01 +0000 (15:32 +1000)]
godoc: remove paragraph tags around navigation div

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

13 years agogodoc: don't display navigation list with only 1 element
Andrew Gerrand [Fri, 20 May 2011 04:26:00 +0000 (14:26 +1000)]
godoc: don't display navigation list with only 1 element

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

13 years agogo/printer, gofmt: fix formatting of expression lists (missing blank)
Robert Griesemer [Fri, 20 May 2011 00:05:35 +0000 (17:05 -0700)]
go/printer, gofmt: fix formatting of expression lists (missing blank)

This appears to have been a long-standing formatting bug.
The test cases has misformatted golden files.

Applied gofmt -w src misc .

Fixes #1839.

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

13 years agoA+C: Alexander Orlov (individual CLA)
Robert Griesemer [Thu, 19 May 2011 23:53:50 +0000 (16:53 -0700)]
A+C: Alexander Orlov (individual CLA)

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

13 years agotemplate: support string, int and float literals
Gustavo Niemeyer [Thu, 19 May 2011 12:24:27 +0000 (09:24 -0300)]
template: support string, int and float literals

This enables customizing the behavior of formatters
with logic such as {"template"|import} or even
{Field1 Field2 "%.2f 0x%X"|printf}

Thanks to Roger Peppe for some debate on this.

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

13 years agoflag: fix docs on flag.Var.
David Symonds [Thu, 19 May 2011 04:53:26 +0000 (14:53 +1000)]
flag: fix docs on flag.Var.

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

13 years agocrypto/rand: add utility functions for number generation
Anthony Martin [Thu, 19 May 2011 01:55:06 +0000 (18:55 -0700)]
crypto/rand: add utility functions for number generation

This code is extracted from crypto/rsa with
a few variables renamed and a comment fixed.

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

13 years agohttp: Client.Do should follow redirects for GET and HEAD
Brad Fitzpatrick [Thu, 19 May 2011 00:17:26 +0000 (17:17 -0700)]
http: Client.Do should follow redirects for GET and HEAD

It's documented as such, but it was never wired up
after Transport went in and Head was fixed.

If people don't want redirects, that's what RoundTripper/
Transport are for.  Or a custom redirect policy.

R=golang-dev, kevlar
CC=golang-dev
https://golang.org/cl/4526065

13 years agosyscall: add netlink support for linux/386, linux/amd64, linux/arm
Mikio Hara [Wed, 18 May 2011 23:33:41 +0000 (16:33 -0700)]
syscall: add netlink support for linux/386, linux/amd64, linux/arm

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

13 years agoimage/jpeg: small memory layout optimization for encoding.
Nigel Tao [Wed, 18 May 2011 21:39:37 +0000 (14:39 -0700)]
image/jpeg: small memory layout optimization for encoding.

Before:
jpeg.BenchmarkEncodeRGBOpaque ... 23.29 MB/s
jpeg.BenchmarkEncodeRGBOpaque ... 23.27 MB/s
jpeg.BenchmarkEncodeRGBOpaque ... 23.17 MB/s

After:
jpeg.BenchmarkEncodeRGBOpaque ... 23.42 MB/s
jpeg.BenchmarkEncodeRGBOpaque ... 23.34 MB/s
jpeg.BenchmarkEncodeRGBOpaque ... 23.33 MB/s

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

13 years ago crypto/x509: add support for parsing and verifying DSA signatures
Jonathan Allie [Wed, 18 May 2011 19:59:04 +0000 (12:59 -0700)]
crypto/x509: add support for parsing and verifying DSA signatures
(DSA with SHA1, DSA with SHA256). Cleanup getSignatureFromOID
function.

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

13 years agofmt: fix minor documentation nits
Robert Griesemer [Wed, 18 May 2011 18:34:19 +0000 (11:34 -0700)]
fmt: fix minor documentation nits

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

13 years agocgo: use packed struct to fix Windows behavior
Russ Cox [Wed, 18 May 2011 18:08:12 +0000 (14:08 -0400)]
cgo: use packed struct to fix Windows behavior

R=golang-dev, mattn.jp, jcowgar, iant
CC=golang-dev
https://golang.org/cl/4535080

13 years agobig: support %v and # modifier, better handling of unknown formats
Robert Griesemer [Wed, 18 May 2011 18:02:08 +0000 (11:02 -0700)]
big: support %v and # modifier, better handling of unknown formats

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

13 years agoimage/jpeg: make writeDQT do fewer array copies.
Nigel Tao [Wed, 18 May 2011 17:56:20 +0000 (10:56 -0700)]
image/jpeg: make writeDQT do fewer array copies.

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

13 years agosyscall: adjust freebsd syscalls.master URL properly
Mikio Hara [Wed, 18 May 2011 17:28:01 +0000 (13:28 -0400)]
syscall: adjust freebsd syscalls.master URL properly

R=golang-dev, devon.odell
CC=golang-dev
https://golang.org/cl/4552051