]> Cypherpunks.ru repositories - gostls13.git/log
gostls13.git
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

13 years agopkg: spelling tweaks, A-H
Robert Hencke [Wed, 18 May 2011 17:14:56 +0000 (13:14 -0400)]
pkg: spelling tweaks, A-H

R=ality, bradfitz, rsc, dsymonds, adg, qyzhai, dchest
CC=golang-dev
https://golang.org/cl/4536063

13 years ago6l: fix emit windows dwarf sections
Wei Guangjing [Wed, 18 May 2011 17:12:38 +0000 (13:12 -0400)]
6l: fix emit windows dwarf sections

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

13 years agohttp: add Transport.ProxySelector
Brad Fitzpatrick [Wed, 18 May 2011 16:23:29 +0000 (09:23 -0700)]
http: add Transport.ProxySelector

R=mattn.jp, rsc
CC=golang-dev
https://golang.org/cl/4528077

13 years agosyscall: add TODO about required manual corrections
Mikio Hara [Wed, 18 May 2011 14:51:45 +0000 (10:51 -0400)]
syscall: add TODO about required manual corrections

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

13 years agoimage/jpeg: fix bounds calculation for grayscale JPEG images.
Nigel Tao [Tue, 17 May 2011 22:47:14 +0000 (15:47 -0700)]
image/jpeg: fix bounds calculation for grayscale JPEG images.

Also add grayscale test cases for image/decode_test.

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

13 years agobig: better support for string conversions
Robert Griesemer [Tue, 17 May 2011 22:32:38 +0000 (15:32 -0700)]
big: better support for string conversions

Fixes #1842.

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

13 years agohttp: add http.SetCookie(ResponseWriter, *Cookie)
Brad Fitzpatrick [Tue, 17 May 2011 22:07:44 +0000 (15:07 -0700)]
http: add http.SetCookie(ResponseWriter, *Cookie)

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

13 years agobig: add Int methods to act on numbered bits.
Roger Peppe [Tue, 17 May 2011 20:38:21 +0000 (13:38 -0700)]
big: add Int methods to act on numbered bits.
Speeds up setting individual bits by ~75%, useful
when using big.Int as a bit set.

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

13 years agogo/ast resolver: properly maintain map of package global imports
Robert Griesemer [Tue, 17 May 2011 18:22:52 +0000 (11:22 -0700)]
go/ast resolver: properly maintain map of package global imports

- add Data field to ast.Object
- for package objects, the Data field holds the package scope
- resolve several TODOs

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

13 years agoreflect: make allocation test less fragile.
Rob Pike [Tue, 17 May 2011 15:15:14 +0000 (11:15 -0400)]
reflect: make allocation test less fragile.
When GOMAXPROCS>1, the testing framework runs in parallel with the
test itself and may do a small number of allocations, so allow the
"noAllocs" condition to admit just a few.

Fixes #1782.

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

13 years agodoc: add Korean Go site
Andrew Gerrand [Tue, 17 May 2011 04:24:32 +0000 (14:24 +1000)]
doc: add Korean Go site

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

13 years agopkg: fix new incorrect prints found by govet
Robert Hencke [Tue, 17 May 2011 04:15:06 +0000 (21:15 -0700)]
pkg: fix new incorrect prints found by govet

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

13 years agodoc: add I/O 2011 talks to talks/, docs.html, and front page.
Andrew Gerrand [Tue, 17 May 2011 03:46:54 +0000 (13:46 +1000)]
doc: add I/O 2011 talks to talks/, docs.html, and front page.

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

13 years agonet, http: add and make use of IP address scope identification API
Mikio Hara [Tue, 17 May 2011 03:21:13 +0000 (23:21 -0400)]
net, http: add and make use of IP address scope identification API

Add seven methods to IP struct: IsUnspecified, IsLoopback,
IsMulticast, IsInterfaceLocalMulticast, IsLinkLocalMulticast,
IsLinkLocalUnicast and IsGlobalUnicast.

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

13 years agofilepath: make EvalSymlinks work on Windows
Alex Brainman [Tue, 17 May 2011 02:33:36 +0000 (12:33 +1000)]
filepath: make EvalSymlinks work on Windows

Fixes #1830.

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

13 years ago8g: fix conversion from float to uint64
Anthony Martin [Tue, 17 May 2011 02:14:56 +0000 (22:14 -0400)]
8g: fix conversion from float to uint64

The code for converting negative floats was
incorrectly loading an FP control word from
the stack without ever having stored it there.

Thanks to Lars Pensjö for reporting this bug.

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

13 years agoimage/gif: enable images with <8 bits per pixel.
Rob Pike [Mon, 16 May 2011 23:00:41 +0000 (16:00 -0700)]
image/gif: enable images with <8 bits per pixel.

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

13 years agoGIF: support decoding of interlaced images.
Rob Pike [Mon, 16 May 2011 22:17:17 +0000 (15:17 -0700)]
GIF: support decoding of interlaced images.

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

13 years agonet: sort records returned by LookupSRV
Gary Burd [Mon, 16 May 2011 21:48:00 +0000 (17:48 -0400)]
net: sort records returned by LookupSRV

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

13 years agoA+C: Gary Burd (individual CLA)
Russ Cox [Mon, 16 May 2011 21:47:54 +0000 (17:47 -0400)]
A+C: Gary Burd (individual CLA)

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

13 years agodoc/go_mem.html: close happens before receive on closed channel
Russ Cox [Mon, 16 May 2011 21:03:51 +0000 (17:03 -0400)]
doc/go_mem.html: close happens before receive on closed channel

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

13 years agonet: protocol family adaptive address family selection
Mikio Hara [Mon, 16 May 2011 21:03:06 +0000 (17:03 -0400)]
net: protocol family adaptive address family selection

This CL will help to make an adaptive address family
selection possible when an any address family, vague
network string such as "ip", "tcp" or "udp" is passed
to Dial and Listen API.

Fixes #1769.

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

13 years agoruntime: make StackSystem part of StackGuard
Alexey Borzenkov [Mon, 16 May 2011 20:57:49 +0000 (16:57 -0400)]
runtime: make StackSystem part of StackGuard

Fixes #1779

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

13 years agold: do not emit reference to dynamic library named ""
Russ Cox [Mon, 16 May 2011 20:24:17 +0000 (16:24 -0400)]
ld: do not emit reference to dynamic library named ""

Fixes #1778.

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

13 years ago5c, 5g: another attempt at silencing gcc
Russ Cox [Mon, 16 May 2011 20:15:13 +0000 (16:15 -0400)]
5c, 5g: another attempt at silencing gcc

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

13 years ago5l: delete pre-ARMv4 instruction implementations
Russ Cox [Mon, 16 May 2011 20:14:37 +0000 (16:14 -0400)]
5l: delete pre-ARMv4 instruction implementations

Add implementation for addr<->reg short moves.
Align large data, for ARM.

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

13 years agocrypto/x509: support DSA public keys in X.509 certs.
Adam Langley [Mon, 16 May 2011 18:16:48 +0000 (11:16 -0700)]
crypto/x509: support DSA public keys in X.509 certs.

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

13 years agoos: fix Windows build from earlier readdir change
Brad Fitzpatrick [Mon, 16 May 2011 17:27:49 +0000 (10:27 -0700)]
os: fix Windows build from earlier readdir change

It worked originally, until I renamed a variable. :/

dir_windows.go:11: undefined: e
http://godashboard.appspot.com/log/092397f2ac7a1e6e812dc6bebc65b40b02368700a119343d5cee5e2e89e0fde5

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

13 years agoimage/jpeg: decode grayscale images, not just color images.
Nigel Tao [Mon, 16 May 2011 17:13:17 +0000 (10:13 -0700)]
image/jpeg: decode grayscale images, not just color images.

Also add an image package test that DecodeConfig returns the same
ColorModel as what Decode would.

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

13 years agoos: make Readdir & Readdirnames return os.EOF at end
Brad Fitzpatrick [Mon, 16 May 2011 16:26:16 +0000 (09:26 -0700)]
os: make Readdir & Readdirnames return os.EOF at end

Fixes #678

R=rsc, r, alex.brainman, bsiegert, jdpoirier
CC=golang-dev
https://golang.org/cl/4536058

13 years agospec: fix copy to return "number of elements copied", not "number
Nigel Tao [Sun, 15 May 2011 23:04:37 +0000 (16:04 -0700)]
spec: fix copy to return "number of elements copied", not "number
of arguments copied".

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

13 years agostrings: make Reader.Read use copy instead of an explicit loop.
Nigel Tao [Sun, 15 May 2011 20:14:10 +0000 (13:14 -0700)]
strings: make Reader.Read use copy instead of an explicit loop.

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

13 years agogofmt: skip bug340.go in test.sh
Robert Hencke [Sun, 15 May 2011 06:06:50 +0000 (23:06 -0700)]
gofmt: skip bug340.go in test.sh

bug340.go is a test case for a syntax error

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

13 years agopkg: fix incorrect prints found by govet
Robert Hencke [Sun, 15 May 2011 03:43:18 +0000 (20:43 -0700)]
pkg: fix incorrect prints found by govet

Also, clarify some error messages

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

13 years agounicode: build maketables during testshort too
Brad Fitzpatrick [Sat, 14 May 2011 23:54:49 +0000 (16:54 -0700)]
unicode: build maketables during testshort too

Fixes #1825

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

13 years agocrypto/openpgp: change PublicKey.Serialize to include the header.
Adam Langley [Sat, 14 May 2011 23:13:12 +0000 (19:13 -0400)]
crypto/openpgp: change PublicKey.Serialize to include the header.

Signature.Serialize already does this and they should be consistent.

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

13 years agomisc/vim: drop indent support for jump labels.
David Symonds [Sat, 14 May 2011 16:45:32 +0000 (09:45 -0700)]
misc/vim: drop indent support for jump labels.

It interferes with keys in composite literals,
which are much more common.

R=dchest, jnwhiteh, rlight2
CC=golang-dev
https://golang.org/cl/4521065

13 years agofix windows build: http.Get finalURL removal missed earlier
Brad Fitzpatrick [Sat, 14 May 2011 01:56:39 +0000 (18:56 -0700)]
fix windows build: http.Get finalURL removal missed earlier

Not sure why this only broke Windows. Make test is only run
on windows for that directory?

TBR=golang-dev

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

13 years agogo/types: fix (some) builds
Robert Griesemer [Sat, 14 May 2011 01:33:04 +0000 (18:33 -0700)]
go/types: fix (some) builds

The position (type) for which the "invalid cycle" error
message is reported depends on which type in a cycle of
types is first checked. Which one is first depends on
the iteration order of maps which is different on
different platforms. For now, disable this error message.

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

13 years agocontrib*.html: make "golang-dev" the default reviewer.
Rob Pike [Fri, 13 May 2011 23:25:31 +0000 (16:25 -0700)]
contrib*.html: make "golang-dev" the default reviewer.
also make a couple of links more visible and fix an id= href.

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

13 years agohttp: add Request.SetBasicAuth method
Brad Fitzpatrick [Fri, 13 May 2011 22:43:46 +0000 (15:43 -0700)]
http: add Request.SetBasicAuth method

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

13 years agogc: generalize dst = append(src,...) inlining to arbitrary src and dst arguments.
Luuk van Dijk [Fri, 13 May 2011 22:35:10 +0000 (00:35 +0200)]
gc: generalize dst = append(src,...) inlining to arbitrary src and dst arguments.

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

13 years agogo/types: type checker API + testing infrastructure
Robert Griesemer [Fri, 13 May 2011 22:31:09 +0000 (15:31 -0700)]
go/types: type checker API + testing infrastructure

At the moment types.Check() only deals with global
types and only partially so. But the framework is
there to compute them and check for cycles. An initial
type test is passing.

First step of a series of CLs to come.

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

13 years agogo spec: fix error in production syntax
Robert Griesemer [Fri, 13 May 2011 19:54:51 +0000 (12:54 -0700)]
go spec: fix error in production syntax

Fix analoguous error in ebnf.go which already
correctly accepted an empty production.

Fixes #1821.

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

13 years agotiming: update numbers for regex-dna
Rob Pike [Fri, 13 May 2011 17:58:41 +0000 (10:58 -0700)]
timing: update numbers for regex-dna
After improved compilation of append, regexps improve and regex-dna is 35% faster.

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

13 years ago5c, 5g: fix build with too-smart gcc
Russ Cox [Fri, 13 May 2011 16:15:46 +0000 (12:15 -0400)]
5c, 5g: fix build with too-smart gcc

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

13 years agodashboard: delay hg pull until needed
Russ Cox [Fri, 13 May 2011 16:14:31 +0000 (12:14 -0400)]
dashboard: delay hg pull until needed

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

13 years agomisc/vim: new Vim indentation script.
David Symonds [Fri, 13 May 2011 15:29:44 +0000 (08:29 -0700)]
misc/vim: new Vim indentation script.

This uses a fully custom function for indenting Go code in Vim.
It provides a lot more flexibility than a cindent-based approach,
so this version gets the := operator correct, as well as switch
labels and jump labels.

One outstanding TODO is to handle lines immediately after jump labels.

R=adg, n13m3y3r, jnwhiteh, dchest, rsc, rlight2
CC=golang-dev, rivercheng
https://golang.org/cl/4534047

13 years agohttp: make HEAD client request follow redirects
Eivind Uggedal [Fri, 13 May 2011 15:17:59 +0000 (08:17 -0700)]
http: make HEAD client request follow redirects

HEAD requests should in my opinion have the ability to follow redirects
like the implementation of GET requests does. My use case is polling
several thousand severs to check if they respond with 200 status codes.
Using GET requests is neither efficient in running time of the task nor
for bandwidth consumption.

This suggested patch changes the return signature of http.Head() to match
that of http.Get(), providing the final URL in a redirect chain.

`curl -IL http://google.com` follows redirects with HEAD requests just fine.

Fixes #1806.

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

13 years agocodereview: handle 'null as missing field' in rietveld json
Russ Cox [Fri, 13 May 2011 15:17:06 +0000 (11:17 -0400)]
codereview: handle 'null as missing field' in rietveld json

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

13 years agoA+C: Eivind Uggedal (individual CLA)
Russ Cox [Fri, 13 May 2011 15:16:01 +0000 (08:16 -0700)]
A+C: Eivind Uggedal (individual CLA)

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

13 years agodoc: auto-generated html change missing from 7ee7980ea06d
Brad Fitzpatrick [Fri, 13 May 2011 15:12:34 +0000 (08:12 -0700)]
doc: auto-generated html change missing from 7ee7980ea06d

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

13 years agomisc/emacs: bug fix: use UTF-8 when invoking gofmt as a subprocess.
Sameer Ajmani [Fri, 13 May 2011 15:05:03 +0000 (11:05 -0400)]
misc/emacs: bug fix: use UTF-8 when invoking gofmt as a subprocess.
Without this, Unicode characters are stripped out by M-x gofmt.

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

13 years agohttp: remove finalURL from Client.Get; move to Response
Brad Fitzpatrick [Fri, 13 May 2011 14:31:24 +0000 (07:31 -0700)]
http: remove finalURL from Client.Get; move to Response

This CL:

-- removes Response.RequestMethod string
-- adds Response.Request *Request
-- removes the finalURL result parameter from client.Get()
-- adds a gofix rule for callers of http.Get which assign
   the final url to the blank identifier; warning otherwise

Caller who did:

res, finalURL, err := http.Get(...)

now need to do:

res, err := http.Get(...)
if err != nil {
   ...
}
finalURL := res.Request.URL.String()

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

13 years agonet: remove unused functions
Mikio Hara [Fri, 13 May 2011 14:00:06 +0000 (07:00 -0700)]
net: remove unused functions

Remove unused functions, getip() and sockaddrToString().
Remove unnecessary linebreaks.

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

13 years ago6l, 8l: emit windows dwarf sections similar to other platforms
Alex Brainman [Fri, 13 May 2011 06:05:47 +0000 (16:05 +1000)]
6l, 8l: emit windows dwarf sections similar to other platforms

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

13 years agostrconv: document and test True and False for Atob
Robert Hencke [Fri, 13 May 2011 05:00:50 +0000 (22:00 -0700)]
strconv: document and test True and False for Atob

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

13 years agogotest: document unit of time for elapsed()
Robert Hencke [Fri, 13 May 2011 05:00:14 +0000 (22:00 -0700)]
gotest: document unit of time for elapsed()

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

13 years agogo/*: various small fixes
Robert Griesemer [Fri, 13 May 2011 03:14:58 +0000 (20:14 -0700)]
go/*: various small fixes

parser:
- resolve embedded interface type names
ast:
- clarify some comments
- correctly unquote import paths

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

13 years agocodereview: fix clpatch
Russ Cox [Fri, 13 May 2011 03:11:52 +0000 (23:11 -0400)]
codereview: fix clpatch

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

13 years agoimage/tiff: Reject images with SampleFormat != 1.
Benny Siegert [Fri, 13 May 2011 02:34:48 +0000 (22:34 -0400)]
image/tiff: Reject images with SampleFormat != 1.

The TIFF spec says that a baseline TIFF reader must gracefully terminate
when the image has a SampleFormat tag which it does not support.
For baseline compatibility, only SampleFormat=1 (the default) is needed.
Images with other sample formats (e.g. floating-point color values)
are very rare in practice.

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

13 years agohtml: parse empty, unquoted, and single-quoted attribute values
Brad Fitzpatrick [Thu, 12 May 2011 23:11:35 +0000 (16:11 -0700)]
html: parse empty, unquoted, and single-quoted attribute values

Fixes #1391

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

13 years agogo spec: clarify semantics of range clause
Robert Griesemer [Thu, 12 May 2011 16:15:59 +0000 (09:15 -0700)]
go spec: clarify semantics of range clause

This CL proposes some subtle language changes
in an attempt to clarify the semantics of range
clauses and simplify uses of maps.

- nil maps behave like empty maps; but attempting
  to set a value in a nil map causes a run-time panic
- nil channels are never ready for communication;
  sending or reading from a nil channel blocks forever
- if there is only one index iteration variable in a
  range clause and len(range expression) would be a constant,
  the range expression is not evaluated.
  (was discrepancy with len/cap before)
- the notion of what is a constant expression len(x)
  for (pointer to) arrays x has been generalized and
  simplified (can still be syntactically decided)
  (before: more restrictive syntactic rule that was not
  consistently implemented)

Fixes #1713.

R=r, rsc, iant, ken2, r2, bradfitz, rog
CC=golang-dev
https://golang.org/cl/4444050

13 years agogo/printer: more accurate comment for incomplete structs/interfaces
Robert Griesemer [Thu, 12 May 2011 16:01:50 +0000 (09:01 -0700)]
go/printer: more accurate comment for incomplete structs/interfaces

A struct or interface type node is marked incomplete if fields or
methods have been removed through any kind of filtering, not just
because entries are not exported.

The current message was misleading in some cases (for instance:
"godoc -src reflect Implements").

This CL requires CL 4527050 .

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

13 years agogo/ast: consider anonymous fields and set Incomplete bit when filtering ASTs
Robert Griesemer [Thu, 12 May 2011 16:01:32 +0000 (09:01 -0700)]
go/ast: consider anonymous fields and set Incomplete bit when filtering ASTs

Also:
- fieldListExports: don't require internal pointer to StructType/InterfaceType node
- filterFieldLists: make structure match fieldListExports

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

13 years agogo/doc, godoc: when filtering for godoc, don't remove elements of a declaration
Robert Griesemer [Thu, 12 May 2011 16:01:10 +0000 (09:01 -0700)]
go/doc, godoc: when filtering for godoc, don't remove elements of a declaration

Partially revert CL 4518050. In go/doc.go, instead of calling the go/ast filter
functions, implement the corresponding match functions that do no remove
declaration elements.

Fixes #1803.

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

13 years agodashboard: fix for branches
Russ Cox [Thu, 12 May 2011 15:21:34 +0000 (11:21 -0400)]
dashboard: fix for branches

In the new world, one builder runs
        gobuilder -commit
which uploads information about commits to the dashboard,
which then hands the work out to the builders by hash.
There is no assumption anymore that the commit numbers
are consistent across builders.

New builders will need to be deployed.  For now darwin-amd64
is running the new builder to test the code.

The new JSON-based protocol for handing out work via /todo
should be easy to extend if we want to add support for sending
trial CLs to the builders.

This code is already running on godashboard.appspot.com.

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