]> Cypherpunks.ru repositories - gostls13.git/log
gostls13.git
12 years agoweekly.2011-11-02 weekly.2011-11-02
Andrew Gerrand [Wed, 2 Nov 2011 03:00:13 +0000 (12:00 +0900)]
weekly.2011-11-02

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

12 years agoall: rename os.Error to error in various non-code contexts
Russ Cox [Wed, 2 Nov 2011 02:58:09 +0000 (22:58 -0400)]
all: rename os.Error to error in various non-code contexts

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

12 years agoos: fixes for error (plan9)
Russ Cox [Wed, 2 Nov 2011 02:19:40 +0000 (22:19 -0400)]
os: fixes for error (plan9)

The Plan 9 build stops in runtime,
but might as well fix these anyway.

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

12 years agonet: update for error (linux)
Russ Cox [Wed, 2 Nov 2011 02:18:16 +0000 (22:18 -0400)]
net: update for error (linux)

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

12 years agoos, syscall: update for error
Russ Cox [Wed, 2 Nov 2011 02:12:41 +0000 (22:12 -0400)]
os, syscall: update for error

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

12 years agonon-pkg: gofix -r error -force=error
Russ Cox [Wed, 2 Nov 2011 02:06:05 +0000 (22:06 -0400)]
non-pkg: gofix -r error -force=error

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

12 years agosrc/pkg/[n-z]*: gofix -r error -force=error
Russ Cox [Wed, 2 Nov 2011 02:05:34 +0000 (22:05 -0400)]
src/pkg/[n-z]*: gofix -r error -force=error

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

12 years agosrc/pkg/[a-m]*: gofix -r error -force=error
Russ Cox [Wed, 2 Nov 2011 02:04:37 +0000 (22:04 -0400)]
src/pkg/[a-m]*: gofix -r error -force=error

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

12 years agotutorial,effective_go: prepare for error change
Rob Pike [Wed, 2 Nov 2011 01:50:21 +0000 (21:50 -0400)]
tutorial,effective_go: prepare for error change

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

12 years agoexec: introduce ExitError
Russ Cox [Wed, 2 Nov 2011 01:49:44 +0000 (21:49 -0400)]
exec: introduce ExitError

The existing code uses *os.Waitmsg as an os.Error,
but *os.Waitmsg is really just a stringer.

Introduce an explicit error type for the real error.

Not to be submitted until just before error goes in;
the gofix for error updates type assertions
        err.(*os.Waitmsg)
to
        err.(*exec.ExitError)

The seemingly redundant String method will become
an Error method when error goes in, and will no longer
be redundant.

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

12 years agoexp/ebnf: manual fixup for error
Russ Cox [Wed, 2 Nov 2011 01:49:33 +0000 (21:49 -0400)]
exp/ebnf: manual fixup for error

(The definition of ErrorList is in another file, so gofix
has no hope of getting this right.)

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

12 years agocgo, gotest: use error instead of os.Error in generated code
Russ Cox [Wed, 2 Nov 2011 01:49:22 +0000 (21:49 -0400)]
cgo, gotest: use error instead of os.Error in generated code

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

12 years agoos: use error, io.EOF
Russ Cox [Wed, 2 Nov 2011 01:49:08 +0000 (21:49 -0400)]
os: use error, io.EOF

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

12 years agoio: use error, add EOF, avoid os
Russ Cox [Wed, 2 Nov 2011 01:48:52 +0000 (21:48 -0400)]
io: use error, add EOF, avoid os

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

12 years agoruntime: update for error
Russ Cox [Wed, 2 Nov 2011 01:48:27 +0000 (21:48 -0400)]
runtime: update for error

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

12 years agoexp/types: add error type to universe
Russ Cox [Wed, 2 Nov 2011 01:47:33 +0000 (21:47 -0400)]
exp/types: add error type to universe

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

12 years agomisc/vim: add error type.
David Symonds [Wed, 2 Nov 2011 01:47:07 +0000 (21:47 -0400)]
misc/vim: add error type.

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

12 years agoerrors: new package
Russ Cox [Wed, 2 Nov 2011 01:46:59 +0000 (21:46 -0400)]
errors: new package

The only function is errors.New, at least for now.

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

12 years agogc: add error type
Russ Cox [Wed, 2 Nov 2011 01:46:41 +0000 (21:46 -0400)]
gc: add error type

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

12 years agohttp: avoid name error in test
Russ Cox [Wed, 2 Nov 2011 01:45:37 +0000 (21:45 -0400)]
http: avoid name error in test

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

12 years agogofix: error fix
Russ Cox [Wed, 2 Nov 2011 01:45:21 +0000 (21:45 -0400)]
gofix: error fix

To make the error fix more useful, expand typecheck to gather
more information about struct fields, typecheck range statements,
typecheck indirect and index of named types, and collect information
about assignment conversions.

Also, change addImport to rename top-level uses of a to-be-imported
identifier to avoid conflicts.  This duplicated some of the code in
the url fix, so that fix is now shorter.

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

12 years agospec: add error
Russ Cox [Wed, 2 Nov 2011 01:45:02 +0000 (21:45 -0400)]
spec: add error

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

12 years agotag weekly.2011-11-01
Andrew Gerrand [Wed, 2 Nov 2011 01:40:35 +0000 (10:40 +0900)]
tag weekly.2011-11-01

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

12 years agoweekly.2011-11-01 weekly.2011-11-01
Andrew Gerrand [Wed, 2 Nov 2011 01:37:01 +0000 (10:37 +0900)]
weekly.2011-11-01

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

12 years agohtml: stop at scope marker node when generating implied </a> tags
Andrew Balholm [Wed, 2 Nov 2011 00:47:05 +0000 (11:47 +1100)]
html: stop at scope marker node when generating implied </a> tags

A <a> tag generates implied end tags for any open <a> elements.
But it shouldn't do that when it is inside a table cell the the open <a>
is outside the table.
So stop the search for an open <a> when we reach a scope marker node.

Pass tests1.dat, test 78:
<a href="blah">aba<table><tr><td><a href="foo">br</td></tr>x</table>aoe

| <html>
|   <head>
|   <body>
|     <a>
|       href="blah"
|       "abax"
|       <table>
|         <tbody>
|           <tr>
|             <td>
|               <a>
|                 href="foo"
|                 "br"
|       "aoe"

Also pass test 79:
<table><a href="blah">aba<tr><td><a href="foo">br</td></tr>x</table>aoe

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

12 years agohtml: refactor the blacklist for the "render and re-parse" test.
Nigel Tao [Tue, 1 Nov 2011 22:42:25 +0000 (09:42 +1100)]
html: refactor the blacklist for the "render and re-parse" test.

R=andybalholm
CC=golang-dev, mikesamuel
https://golang.org/cl/5331056

12 years agotextproto: prevent long lines in HTTP headers from causing HTTP 400 responses.
Mike Solomon [Tue, 1 Nov 2011 17:31:29 +0000 (10:31 -0700)]
textproto: prevent long lines in HTTP headers from causing HTTP 400 responses.

This fixes the issue without an extra copy in the average case.

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

12 years agodoc/Makefile: add 'all' rule to build all docs
Rob Pike [Tue, 1 Nov 2011 16:45:04 +0000 (09:45 -0700)]
doc/Makefile: add 'all' rule to build all docs

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

12 years agogc: test + fix escape analysis bug
Russ Cox [Tue, 1 Nov 2011 15:02:43 +0000 (11:02 -0400)]
gc: test + fix escape analysis bug

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

12 years agodoc: refer to tour.golang.org instead of go-tour.appspot.com
Andrew Gerrand [Tue, 1 Nov 2011 07:09:29 +0000 (16:09 +0900)]
doc: refer to tour.golang.org instead of go-tour.appspot.com

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

12 years agodoc: fix typo in spec example code comment
Charles L. Dorian [Tue, 1 Nov 2011 06:13:33 +0000 (15:13 +0900)]
doc: fix typo in spec example code comment

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

12 years agogo spec: introduce rune type
Robert Griesemer [Tue, 1 Nov 2011 05:09:22 +0000 (01:09 -0400)]
go spec: introduce rune type

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

12 years agorpc: avoid infinite loop on input error
Russ Cox [Tue, 1 Nov 2011 04:29:41 +0000 (00:29 -0400)]
rpc: avoid infinite loop on input error

Fixes #1828.
Fixes #2179.

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

12 years agogopack: change archive file name length back to 16
Russ Cox [Tue, 1 Nov 2011 04:29:16 +0000 (00:29 -0400)]
gopack: change archive file name length back to 16

This CL grew the archive file name length from 16 to 64:

        changeset:   909:58574851d792
        user:        Russ Cox <rsc@golang.org>
        date:        Mon Oct 20 13:53:56 2008 -0700

Back then, every x.go file in a package became an x.6 file
in the archive.  It was important to be able to allow the
use of long Go source file names, hence the increase in size.

Today, all Go source files compile into a single _go_.6 file
regardless of their names, so the archive file name length
no longer needs to be long.  The longer name causes some
problems on Plan 9, where the native archive format is the
same but with 16-byte names, so revert back to 16.

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

12 years agoos: do not interpret 0-length read as EOF
Russ Cox [Tue, 1 Nov 2011 04:17:05 +0000 (00:17 -0400)]
os: do not interpret 0-length read as EOF

Fixes #2402.

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

12 years agohtml: process </td> tags; foster parent at most one node per token
Andrew Balholm [Tue, 1 Nov 2011 00:42:54 +0000 (11:42 +1100)]
html: process </td> tags; foster parent at most one node per token

Correctly close table cell when </td> is read.

Because of reconstructing the active formatting elements, more than one
node may be created when reading a single token.
If both nodes are foster parented, they will be siblings, but the first
node should be the parent of the second.

Pass tests1.dat, test 77:
<a href="blah">aba<table><a href="foo">br<tr><td></td></tr>x</table>aoe

| <html>
|   <head>
|   <body>
|     <a>
|       href="blah"
|       "aba"
|       <a>
|         href="foo"
|         "br"
|       <a>
|         href="foo"
|         "x"
|       <table>
|         <tbody>
|           <tr>
|             <td>
|     <a>
|       href="foo"
|       "aoe"

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

12 years agotemplate: fix error checking on execute without parse
Scott Lawrence [Mon, 31 Oct 2011 23:07:17 +0000 (16:07 -0700)]
template: fix error checking on execute without parse

Fixed error checking in exec.go to give a sensible error message when
execution is attempted before a successful parse (rather than an
outright panic).

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

12 years agopkg: minor cleanup
Russ Cox [Mon, 31 Oct 2011 21:53:39 +0000 (17:53 -0400)]
pkg: minor cleanup

remove some redundant .String()
change variable name to make it os.Error-proof

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

12 years agotest: make bug107 os.Error-proof
Russ Cox [Mon, 31 Oct 2011 21:50:38 +0000 (17:50 -0400)]
test: make bug107 os.Error-proof

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

12 years agoruntime/pprof: document OS X being broken
Russ Cox [Mon, 31 Oct 2011 21:50:25 +0000 (17:50 -0400)]
runtime/pprof: document OS X being broken

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

12 years agotime: add RFC1123 with numeric timezone format
Scott Lawrence [Mon, 31 Oct 2011 19:59:06 +0000 (12:59 -0700)]
time: add RFC1123 with numeric timezone format

Fixes #841.

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

12 years agomath: Improved accuracy for Sin and Cos.
Charles L. Dorian [Mon, 31 Oct 2011 18:26:05 +0000 (14:26 -0400)]
math: Improved accuracy for Sin and Cos.

Fixes #1564.

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

12 years agojson: Properly handle nil slices.
Alexander Reece [Mon, 31 Oct 2011 17:59:23 +0000 (13:59 -0400)]
json: Properly handle nil slices.

Marshal nil slices as null and parse null value as a nil slice.
Fixes #2278.

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

12 years agoA+C: Alexander Reece (individual CLA)
Russ Cox [Mon, 31 Oct 2011 17:59:04 +0000 (13:59 -0400)]
A+C: Alexander Reece (individual CLA)

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

12 years agosyscall: fix Await msg on Plan 9
Andrey Mirtchovski [Mon, 31 Oct 2011 17:34:59 +0000 (13:34 -0400)]
syscall: fix Await msg on Plan 9

Plan 9's await() returns '' for nil exit status but programs, most notably gotest,
see this as an error return.

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

12 years agogc: clean up printing.
Luuk van Dijk [Mon, 31 Oct 2011 17:09:40 +0000 (18:09 +0100)]
gc: clean up printing.

Got rid of all the magic mystery globals. Now
for %N, %T, and %S, the flags +,- and # set a sticky
debug, sym and export mode, only visible in the new fmt.c.
Default is error mode. Handle h and l flags consistently with
the least side effects, so we can now change
things without worrying about unrelated things
breaking.

fixes #2361

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

12 years agonet: Plan 9 fixes
Fazlul Shahriar [Mon, 31 Oct 2011 15:47:44 +0000 (11:47 -0400)]
net: Plan 9 fixes

Makes all tests pass.

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

12 years agomisc/emacs/go-lang.el: Fix restoration of multiple windows in a frame after gofmt
Jan Newmarch [Mon, 31 Oct 2011 15:33:14 +0000 (11:33 -0400)]
misc/emacs/go-lang.el: Fix restoration of multiple windows in a frame after gofmt
If a frame has multiple windows then the windows must all be restored
after gofmt has finished and the old windows must be restored.
Before this fix, only the Go code edit window would be left.

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

12 years agoexp/norm: fixed bug that creeped in with moving to the new
Marcel van Lohuizen [Mon, 31 Oct 2011 09:58:04 +0000 (10:58 +0100)]
exp/norm: fixed bug that creeped in with moving to the new
regexp, which caused the last line of a test block to be ignored.

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

12 years agoexp/ssh: fix length header leaking into channel data streams.
Dave Cheney [Sat, 29 Oct 2011 18:22:30 +0000 (14:22 -0400)]
exp/ssh: fix length header leaking into channel data streams.

The payload of a data message is defined as an SSH string type,
which uses the first four bytes to encode its length. When channelData
and channelExtendedData were added I defined Payload as []byte to
be able to use it directly without a string to []byte conversion. This
resulted in the length data leaking into the payload data.

This CL fixes the bug, and restores agl's original fast path code.

Additionally, a bug whereby s.lock was not released if a packet arrived
for an invalid channel has been fixed.

Finally, as they were no longer used, I have removed
the channelData and channelExtedendData structs.

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

12 years agohtml: adjust bookmark in "adoption agency" algorithm
Andrew Balholm [Fri, 28 Oct 2011 23:51:59 +0000 (10:51 +1100)]
html: adjust bookmark in "adoption agency" algorithm

In the adoption agency algorithm, the formatting element is sometimes
removed from the list of active formatting elements and reinserted at a later index.
In that case, the bookmark showing where it is to be reinserted needs to be moved,
so that its position relative to its neighbors remains the same
(and also so that it doesn't become out of bounds).

Pass tests1.dat, test 70:
<DIV> abc <B> def <I> ghi <P> jkl </B>

| <html>
|   <head>
|   <body>
|     <div>
|       " abc "
|       <b>
|         " def "
|         <i>
|           " ghi "
|       <i>
|         <p>
|           <b>
|             " jkl "

Also pass tests through test 76:
<test attribute---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->

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

12 years agohtml: don't run "adoption agency" on elements that aren't in scope.
Andrew Balholm [Fri, 28 Oct 2011 05:04:58 +0000 (16:04 +1100)]
html: don't run "adoption agency" on elements that aren't in scope.

Pass tests1.dat, test 55:
<!DOCTYPE html><font><table></font></table></font>

| <!DOCTYPE html>
| <html>
|   <head>
|   <body>
|     <font>
|       <table>

Also pass tests through test 69:
<DIV> abc <B> def <I> ghi <P> jkl

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

12 years agofmt: handle os.Error values
Russ Cox [Fri, 28 Oct 2011 04:20:44 +0000 (21:20 -0700)]
fmt: handle os.Error values

Handling os.Error is no different than handling fmt.Stringer
here, so the code is redundant now, but it will be necessary
once error goes in.

Adding it now will make gofix fix it.

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

12 years agotemplate: do not use error as stringer
Russ Cox [Fri, 28 Oct 2011 04:17:47 +0000 (21:17 -0700)]
template: do not use error as stringer

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

12 years agogob: split uses of gobError, remove unnecessary embedding
Russ Cox [Fri, 28 Oct 2011 03:20:59 +0000 (20:20 -0700)]
gob: split uses of gobError, remove unnecessary embedding

Will make gofix for error run more smoothly.
The overloading of gobError appears to be unintentional.

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

12 years agostrconv: use better errors than os.EINVAL, os.ERANGE
Russ Cox [Fri, 28 Oct 2011 02:46:31 +0000 (19:46 -0700)]
strconv: use better errors than os.EINVAL, os.ERANGE

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

12 years agocrypto/tls: add Error method to alert
Russ Cox [Fri, 28 Oct 2011 02:42:32 +0000 (19:42 -0700)]
crypto/tls: add Error method to alert

alerts get used as both values and errors.
Rather than introduce an alertError wrapper,
this CL just adds an Error method, which will
satisfy the error interface when the time comes.

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

12 years agotest: error-related fixes
Russ Cox [Fri, 28 Oct 2011 02:41:39 +0000 (19:41 -0700)]
test: error-related fixes

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

12 years agoxml: simplify test
Russ Cox [Fri, 28 Oct 2011 02:40:41 +0000 (19:40 -0700)]
xml: simplify test

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

12 years agogo/build: avoid os.Error in tests
Russ Cox [Fri, 28 Oct 2011 02:39:40 +0000 (19:39 -0700)]
go/build: avoid os.Error in tests

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

12 years agogo/doc: remove os.NewError anti-heuristic
Russ Cox [Fri, 28 Oct 2011 02:39:25 +0000 (19:39 -0700)]
go/doc: remove os.NewError anti-heuristic

It will be obsolete when error happens.

Submitting this now will make the error transition earlier,
at the cost of making a locally-built godoc viewing
/pkg/syscall or /pkg/os have some functions appear
under the Error type as constructors.

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

12 years agoencoding/binary: fix type in test
Russ Cox [Fri, 28 Oct 2011 02:38:57 +0000 (19:38 -0700)]
encoding/binary: fix type in test

Was working only accidentally.

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

12 years agocrypto/openpgp/error: use Error in names of error impl types
Russ Cox [Fri, 28 Oct 2011 02:38:32 +0000 (19:38 -0700)]
crypto/openpgp/error: use Error in names of error impl types

Will make gofix for error work better.
There is no other indication in this file that
these are actually error implementations.

(They are only used elsewhere.)

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

12 years agodoc: A Tour of Go in Japanese
Andrew Gerrand [Fri, 28 Oct 2011 01:55:58 +0000 (10:55 +0900)]
doc: A Tour of Go in Japanese

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

12 years agohtml: fix print argument in test
Russ Cox [Fri, 28 Oct 2011 01:04:29 +0000 (18:04 -0700)]
html: fix print argument in test

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

12 years agoruntime: lock the main goroutine to the main OS thread during init
Russ Cox [Fri, 28 Oct 2011 01:04:12 +0000 (18:04 -0700)]
runtime: lock the main goroutine to the main OS thread during init

We only guarantee that the main goroutine runs on the
main OS thread for initialization.  Programs that wish to
preserve that property for main.main can call runtime.LockOSThread.
This is what programs used to do before we unleashed
goroutines during init, so it is both a simple fix and keeps
existing programs working.

R=iant, r, dave, dvyukov
CC=golang-dev
https://golang.org/cl/5309070

12 years agopkg: remove .String() from some print arguments
Russ Cox [Fri, 28 Oct 2011 01:03:52 +0000 (18:03 -0700)]
pkg: remove .String() from some print arguments

I found these by adding a check to govet, but the check
produces far too many false positives to be useful.
Even so, these few seem worth cleaning up.

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

12 years agohtml: allow whitespace text nodes in <head>
Andrew Balholm [Thu, 27 Oct 2011 22:06:30 +0000 (09:06 +1100)]
html: allow whitespace text nodes in <head>

Pass tests1.dat, test 50:
<!DOCTYPE html><script> <!-- </script> --> </script> EOF

| <!DOCTYPE html>
| <html>
|   <head>
|     <script>
|       " <!-- "
|     " "
|   <body>
|     "-->  EOF"

Also pass tests through test 54:
<!DOCTYPE html><title>U-test</title><body><div><p>Test<u></p></div></body>

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

12 years agomisc/windows: allow to be used for amd64
Alex Brainman [Thu, 27 Oct 2011 21:45:17 +0000 (08:45 +1100)]
misc/windows: allow to be used for amd64

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

12 years agospec: define that initialization is sequential
Russ Cox [Thu, 27 Oct 2011 19:22:45 +0000 (12:22 -0700)]
spec: define that initialization is sequential

This is true of the existing implementations, and I think
it is an important property to guarantee.

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

12 years agogo/parser: test and fix := scoping bug
Russ Cox [Thu, 27 Oct 2011 19:22:06 +0000 (12:22 -0700)]
go/parser: test and fix := scoping bug

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

12 years agogoinstall: More intelligent vcs selection for common sites
Julian Phillips [Thu, 27 Oct 2011 08:45:07 +0000 (17:45 +0900)]
goinstall: More intelligent vcs selection for common sites

goinstall has built in support for a few common code hosting sites.  The
identification of which vcs tool should be used was based purely on a
regex match against the provided import path.  The problem with this
approach is that it requires distinct import paths for different vcs
tools on the same site.

Since bitbucket has recently starting hosting Git repositories under the
same bitbucket.org/user/project scheme as it already hosts Mercurial
repositories, now would seem a good time to take a more flexible
approach.

We still match the import path against a list of regexes, but now the
match is purely to distinguish the different hosting sites.  Once the
site is identified, the specified function is called with the repo and
path matched out of the import string.  This function is responsible for
creating the vcsMatch structure that tells us what we need to download
the code.

For github and launchpad, only one vcs tool is currently supported, so
these functions can simply return a vcsMatch structure.  For googlecode,
we retain the behaviour of determing the vcs from the import path - but
now it is done by the function instead of the regex.  For bitbucket, we
use api.bitbucket.org to find out what sort of repository the specified
import path corresponds to - and then construct the appropriate vcsMatch
structure.

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

12 years agodoc: fix escaping in weekly.html
Andrew Gerrand [Thu, 27 Oct 2011 06:40:57 +0000 (15:40 +0900)]
doc: fix escaping in weekly.html

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

12 years agohtml: parse <style> elements inside <head> element.
Andrew Balholm [Wed, 26 Oct 2011 23:26:11 +0000 (10:26 +1100)]
html: parse <style> elements inside <head> element.

Also correctly handle EOF inside a <style> element.

Pass tests1.dat, test 49:
<!DOCTYPE html><style> EOF

| <!DOCTYPE html>
| <html>
|   <head>
|     <style>
|       " EOF"
|   <body>

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

12 years agohtml: close <option> element when opening <optgroup>
Andrew Balholm [Wed, 26 Oct 2011 22:45:53 +0000 (09:45 +1100)]
html: close <option> element when opening <optgroup>

Pass tests1.dat, test 34:
<!DOCTYPE html>A<option>B<optgroup>C<select>D</option>E

| <!DOCTYPE html>
| <html>
|   <head>
|   <body>
|     "A"
|     <option>
|       "B"
|     <optgroup>
|       "C"
|       <select>
|         "DE"

Also passes tests 35-48. Test 48 is:
</ COM--MENT >

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

12 years ago6l: remove mention of -e flag
Russ Cox [Wed, 26 Oct 2011 22:28:18 +0000 (15:28 -0700)]
6l: remove mention of -e flag

Emitting ELF symbol table is the default behavior now
and cannot be disabled.

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

12 years agocc: change cas to newcase
Ron Minnich [Wed, 26 Oct 2011 22:27:59 +0000 (15:27 -0700)]
cc: change cas to newcase

Change the name of cas() in cc to newcase() to avoid a NIX conflict.
cas() is used in cc to create a new Case struct. There is a name
conflict in that cas() is a commonly-used
name for compare and swap. Since cas() is only used internally
in the compiler in 3 places, change the name to avoid a wider
conflict with the NIX runtime. This issue might well come up on
other OSes in the future anyway, as the name is fairly common.

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

12 years agotest/alias.go: additional tests
Russ Cox [Wed, 26 Oct 2011 22:27:47 +0000 (15:27 -0700)]
test/alias.go: additional tests

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

12 years agomisc/vim: Add rune keyword
Jongmin Kim [Wed, 26 Oct 2011 22:13:06 +0000 (09:13 +1100)]
misc/vim: Add rune keyword
According to adding rune type

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

12 years agogofix: test import insertion, deletion
Russ Cox [Wed, 26 Oct 2011 21:04:07 +0000 (14:04 -0700)]
gofix: test import insertion, deletion

Small change to go/ast, go/parser, go/printer so that
gofix can delete the blank line left from deleting an import.

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

12 years agoA+C: Ron Minnich (individual CLA)
Russ Cox [Wed, 26 Oct 2011 19:40:45 +0000 (12:40 -0700)]
A+C: Ron Minnich (individual CLA)

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

12 years agoA+C: Jan Newmarch (individual CLA)
Russ Cox [Wed, 26 Oct 2011 19:20:40 +0000 (12:20 -0700)]
A+C: Jan Newmarch (individual CLA)

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

12 years agoC+A: add Jongmin Kim (individual CLA)
Brad Fitzpatrick [Wed, 26 Oct 2011 18:17:48 +0000 (11:17 -0700)]
C+A: add Jongmin Kim (individual CLA)

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

12 years agocrypto/rsa: change public exponent from 3 to 65537
Adam Langley [Wed, 26 Oct 2011 14:41:24 +0000 (10:41 -0400)]
crypto/rsa: change public exponent from 3 to 65537

Although there's still no concrete security reason not to use 3, I
think Bleichenbacher has convinced me that it's a useful defense and
it's what everyone else does.

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

12 years agonet: document why we do not use SO_REUSEADDR on windows
Alex Brainman [Wed, 26 Oct 2011 11:25:20 +0000 (22:25 +1100)]
net: document why we do not use SO_REUSEADDR on windows

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

12 years ago.hgignore: ignore src/pkg/exp/ebnflint/ebnflint
Alex Brainman [Wed, 26 Oct 2011 11:22:33 +0000 (22:22 +1100)]
.hgignore: ignore src/pkg/exp/ebnflint/ebnflint

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

12 years agogc: fix [568]g -V crash
Mikio Hara [Wed, 26 Oct 2011 07:16:46 +0000 (16:16 +0900)]
gc: fix [568]g -V crash

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

12 years agoredo CL 5302057 / dac58d9c9e4a
Andrew Gerrand [Wed, 26 Oct 2011 06:27:29 +0000 (15:27 +0900)]
redo CL 5302057 / dac58d9c9e4a

««« original CL description
http: remove Connection header in ReverseProxy

Fixes #2342

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

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

12 years agotag weekly.2011-10-26
Andrew Gerrand [Wed, 26 Oct 2011 06:10:00 +0000 (15:10 +0900)]
tag weekly.2011-10-26

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

12 years agoweekly.2011-10-26 (new rune type) weekly.2011-10-26
Andrew Gerrand [Wed, 26 Oct 2011 05:47:38 +0000 (14:47 +0900)]
weekly.2011-10-26 (new rune type)

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

12 years agoexp/norm: use rune
Russ Cox [Wed, 26 Oct 2011 05:26:12 +0000 (22:26 -0700)]
exp/norm: use rune

Nothing terribly interesting here. (!)

Since the public APIs are all in terms of UTF-8,
the changes are all internal only.

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

12 years agocsv, gob, json, mail, mime, xml: use rune
Russ Cox [Wed, 26 Oct 2011 05:23:54 +0000 (22:23 -0700)]
csv, gob, json, mail, mime, xml: use rune

Nothing terribly interesting here.

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

12 years agobufio, io: use rune
Russ Cox [Wed, 26 Oct 2011 05:23:34 +0000 (22:23 -0700)]
bufio, io: use rune

ReadRune, WriteRune change signature.

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

12 years agounicode, utf8, utf16: use rune
Russ Cox [Wed, 26 Oct 2011 05:23:15 +0000 (22:23 -0700)]
unicode, utf8, utf16: use rune

Everything changes.

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

12 years agoold/regexp, old/template, template: use rune
Russ Cox [Wed, 26 Oct 2011 05:22:42 +0000 (22:22 -0700)]
old/regexp, old/template, template: use rune

Nothing terribly interesting here.

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

12 years agoexp/template/html: use rune
Russ Cox [Wed, 26 Oct 2011 05:22:26 +0000 (22:22 -0700)]
exp/template/html: use rune

Nothing terribly interesting here.

R=mikesamuel, nigeltao, r
CC=golang-dev
https://golang.org/cl/5307044

12 years agobytes, strings: use rune
Russ Cox [Wed, 26 Oct 2011 05:22:09 +0000 (22:22 -0700)]
bytes, strings: use rune

Various rune-based APIs change.

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

12 years agobig: update for fmt interface changes
Russ Cox [Wed, 26 Oct 2011 05:21:49 +0000 (22:21 -0700)]
big: update for fmt interface changes

Nothing terribly interesting here.

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

12 years agofmt: use rune
Russ Cox [Wed, 26 Oct 2011 05:21:33 +0000 (22:21 -0700)]
fmt: use rune

Lots of internal edits.

Formatter and Scanner interfaces change
(clients to be checked by govet).

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

12 years agoexp/winfsnotify: fix govet-found bug
Russ Cox [Wed, 26 Oct 2011 05:21:14 +0000 (22:21 -0700)]
exp/winfsnotify: fix govet-found bug

R=golang-dev, hectorchu
CC=golang-dev
https://golang.org/cl/5304044