]> Cypherpunks repositories - gostls13.git/log
gostls13.git
13 years agonet: drop unnecessary type assertions and fix leak in test
Mikio Hara [Tue, 20 Mar 2012 01:57:54 +0000 (10:57 +0900)]
net: drop unnecessary type assertions and fix leak in test

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

13 years agogc: fix struct and array comparisons for new bool rules
Anthony Martin [Mon, 19 Mar 2012 22:57:28 +0000 (15:57 -0700)]
gc: fix struct and array comparisons for new bool rules

The two optimizations for small structs and arrays
were missing the implicit cast from ideal bool.

Fixes #3351.

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

13 years agocrypto/tls: always send a Certificate message if one was requested.
Adam Langley [Mon, 19 Mar 2012 16:34:35 +0000 (12:34 -0400)]
crypto/tls: always send a Certificate message if one was requested.

If a CertificateRequest is received we have to reply with a
Certificate message, even if we don't have a certificate to offer.

Fixes #3339.

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

13 years agodoc: update format for "C? Go? Cgo!" article
Shenghou Ma [Mon, 19 Mar 2012 14:54:06 +0000 (22:54 +0800)]
doc: update format for "C? Go? Cgo!" article

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

13 years agopath/filepath: implement Match and Glob on windows
Alex Brainman [Mon, 19 Mar 2012 05:51:06 +0000 (16:51 +1100)]
path/filepath: implement Match and Glob on windows

As discussed on golang-dev, windows will use
"\" as path separator. No escaping allowed.

R=golang-dev, r, mattn.jp, rsc, rogpeppe, bsiegert, r
CC=golang-dev
https://golang.org/cl/5825044

13 years agodoc: move sub-repos lower on reference page
Andrew Gerrand [Mon, 19 Mar 2012 02:52:26 +0000 (13:52 +1100)]
doc: move sub-repos lower on reference page

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

13 years agosysycall: remove creds_linux_test.go
Rob Pike [Mon, 19 Mar 2012 00:15:28 +0000 (11:15 +1100)]
sysycall: remove creds_linux_test.go
It is unprecedented to add tests to package syscall, especially
system-specific ones. Not a policy worth changing right before Go 1
is cut.

The sole existing test, passfd_test.go, contains the line
        // +build linux darwin probablyfreebsd probablyopenbsd
which argues that this is not a subject to be undertaking likely.
Note that passfd_test.go also went in just now. It's the only test
in syscall.

Deleting for now, will reconsider after Go 1.

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

13 years agosyscall: delete passfd_test.go
Rob Pike [Mon, 19 Mar 2012 00:12:32 +0000 (11:12 +1100)]
syscall: delete passfd_test.go

We can revisit the issue of testing in syscall after Go 1.

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

13 years agodoc: various typos, remove apostrophes from ordinals
Jeremy Jackins [Sun, 18 Mar 2012 21:26:36 +0000 (08:26 +1100)]
doc: various typos, remove apostrophes from ordinals

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

13 years agosyscall: Test SCM_CREDENTIALS, SO_PASSCRED on Linux.
Albert Strasheim [Sun, 18 Mar 2012 17:03:00 +0000 (10:03 -0700)]
syscall: Test SCM_CREDENTIALS, SO_PASSCRED on Linux.

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

13 years agosyscall: add a test for passing an fd over a unix socket
Brad Fitzpatrick [Sun, 18 Mar 2012 05:19:57 +0000 (22:19 -0700)]
syscall: add a test for passing an fd over a unix socket

Updates #1101

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

13 years agobuild: catch API changes during build
Brad Fitzpatrick [Sat, 17 Mar 2012 18:20:46 +0000 (11:20 -0700)]
build: catch API changes during build

Adds new file api/go1.txt, locking down the current API.
Any changes to the API will need to update that file.

run.bash (but not make.bash, or Windows) will check for
accidental API changes.

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

13 years agospec: delete references to unsafe.Reflect,Typeof,Unreflect
Rob Pike [Sat, 17 Mar 2012 11:50:59 +0000 (22:50 +1100)]
spec: delete references to unsafe.Reflect,Typeof,Unreflect
They have been deleted from package unsafe.
Also delete their appearance in exp/types.

Fixes #3338.

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

13 years agodoc/install: remove reference to "Go Tutorial"
Shenghou Ma [Sat, 17 Mar 2012 10:13:02 +0000 (18:13 +0800)]
doc/install: remove reference to "Go Tutorial"

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

13 years agodoc/go_faq: minor update
Shenghou Ma [Sat, 17 Mar 2012 07:53:40 +0000 (15:53 +0800)]
doc/go_faq: minor update

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

13 years agogodoc: use FormatText for formating code in html template.
Johan Euphrosine [Fri, 16 Mar 2012 22:33:05 +0000 (15:33 -0700)]
godoc: use FormatText for formating code in html template.

R=golang-dev, rsc, r, adg, gri, r
CC=golang-dev
https://golang.org/cl/5835046

13 years agocmd/go: don't add detail to errPrintedOutput
Russ Cox [Fri, 16 Mar 2012 20:35:16 +0000 (16:35 -0400)]
cmd/go: don't add detail to errPrintedOutput

This makes the last error-reporting CL a bit less
aggressive.  errPrintedOutput is a sentinel value
that should not be wrapped.

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

13 years agocmd/pack: also recognize '\\' as path separator in filenames
Shenghou Ma [Fri, 16 Mar 2012 17:34:44 +0000 (01:34 +0800)]
cmd/pack: also recognize '\\' as path separator in filenames

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

13 years agogodoc: apply gofmt
Robert Griesemer [Fri, 16 Mar 2012 16:58:23 +0000 (09:58 -0700)]
godoc: apply gofmt

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

13 years agomake.bat: don't show error message if old generated files do not exist
Shenghou Ma [Fri, 16 Mar 2012 16:32:48 +0000 (00:32 +0800)]
make.bat: don't show error message if old generated files do not exist

R=golang-dev, alex.brainman, mattn.jp
CC=golang-dev
https://golang.org/cl/5843045

13 years agocmd/go: add -fno-common by default on Darwin
Shenghou Ma [Fri, 16 Mar 2012 16:05:09 +0000 (12:05 -0400)]
cmd/go: add -fno-common by default on Darwin
        Fixes part of issue 3253.
        We still need to support scattered relocations though.

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

13 years agocmd/go: work around occasional ETXTBSY running cgo
Russ Cox [Fri, 16 Mar 2012 14:44:09 +0000 (10:44 -0400)]
cmd/go: work around occasional ETXTBSY running cgo

Fixes #3001.  (This time for sure!)

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

13 years agoreflect: panic if MakeSlice is given bad len/cap arguments.
David Symonds [Fri, 16 Mar 2012 06:28:16 +0000 (17:28 +1100)]
reflect: panic if MakeSlice is given bad len/cap arguments.

Fixes #3330.

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

13 years agomake.bat: Fix for old files
Christopher Redden [Fri, 16 Mar 2012 03:30:43 +0000 (14:30 +1100)]
make.bat: Fix for old files

Same fix as applied here: https://golang.org/cl/5761044

Fixes #3222.

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

13 years agodoc: use time.Duration in Effective Go.
David Symonds [Fri, 16 Mar 2012 03:27:11 +0000 (14:27 +1100)]
doc: use time.Duration in Effective Go.

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

13 years agoA+C: Christopher Redden (individual CLA)
Russ Cox [Fri, 16 Mar 2012 03:15:38 +0000 (23:15 -0400)]
A+C: Christopher Redden (individual CLA)

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

13 years agoruntime: do not handle signals before configuring handler
Russ Cox [Fri, 16 Mar 2012 02:17:54 +0000 (22:17 -0400)]
runtime: do not handle signals before configuring handler

There was a small window during program initialization
where a signal could come in before the handling mechanisms
were set up to handle it.  Delay the signal-handler installation
until we're ready for the signals.

Fixes #3314.

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

13 years agocmd/gofmt: show ascii in usage.
Yasuhiro Matsumoto [Thu, 15 Mar 2012 23:38:27 +0000 (16:38 -0700)]
cmd/gofmt: show ascii in usage.
windows cmd.exe can't show utf-8 correctly basically.
chcp 65001 may make it show, but most people don't have fonts which can
show it.

R=golang-dev, rsc, adg, gri, r
CC=golang-dev
https://golang.org/cl/5820060

13 years agocmd/cgo: add support for function export for gccgo.
Rémy Oudompheng [Thu, 15 Mar 2012 22:50:25 +0000 (23:50 +0100)]
cmd/cgo: add support for function export for gccgo.

A "gccgoprefix" flag is added and used by the go tool,
to mirror the -fgo-prefix flag for gccgo, whose value
is required to know how to access functions from C.

Trying to export Go methods or unexported Go functions
will not work.

Also fix go test on "main" packages.

Updates #2313.
Fixes #3262.

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

13 years agomisc/dist: don't ship cmd/cov or cmd/prof
Brad Fitzpatrick [Thu, 15 Mar 2012 22:22:56 +0000 (15:22 -0700)]
misc/dist: don't ship cmd/cov or cmd/prof

Fixes #3317

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

13 years agocmd/go: quiet some logging
Brad Fitzpatrick [Thu, 15 Mar 2012 22:10:01 +0000 (15:10 -0700)]
cmd/go: quiet some logging

This should've been behind -v before but was missed.

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

13 years agoruntime: fix arm build
Russ Cox [Thu, 15 Mar 2012 21:40:17 +0000 (17:40 -0400)]
runtime: fix arm build

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

13 years agocmd/go: make build errors more visible
Russ Cox [Thu, 15 Mar 2012 21:35:57 +0000 (17:35 -0400)]
cmd/go: make build errors more visible

Fixes #3324.

Robert suggested not reporting errors until the end of the output.
which I'd also like to do, but errPrintedOutput makes that a bigger
change than I want to do before Go 1.  This change should at least
remove the confusion we had.

# Building packages and commands for linux/amd64.
runtime
errors
sync/atomic
unicode
unicode/utf8
math
sync
unicode/utf16
crypto/subtle
io
syscall
hash
crypto
crypto/md5
hash/crc32
crypto/cipher
crypto/hmac
crypto/sha1
go install unicode: copying /tmp/go-build816525784/unicode.a to /home/rsc/g/go/pkg/linux_amd64/unicode.a: short write
hash/adler32
container/list
container/ring
...

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

13 years agodoc: add Gobs of data article
Francisco Souza [Thu, 15 Mar 2012 21:21:13 +0000 (08:21 +1100)]
doc: add Gobs of data article

Originally published on The Go Programming Language Blog, March 24, 2011.

http://blog.golang.org/2011/03/gobs-of-data.html

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

13 years agomisc/dashboard: remove old python package dashboard
Andrew Gerrand [Thu, 15 Mar 2012 21:20:02 +0000 (08:20 +1100)]
misc/dashboard: remove old python package dashboard

This leaves only the project page, which now resides at the web root.

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

13 years agoreflect: document PkgPath, Method, StructField
Russ Cox [Thu, 15 Mar 2012 21:15:57 +0000 (17:15 -0400)]
reflect: document PkgPath, Method, StructField

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

13 years ago5l, 6l, 8l: fix stack split logic for stacks near default segment size
Russ Cox [Thu, 15 Mar 2012 19:22:30 +0000 (15:22 -0400)]
5l, 6l, 8l: fix stack split logic for stacks near default segment size

Fixes #3310.

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

13 years agoos: do not assume syscall.Write will write everything
Russ Cox [Thu, 15 Mar 2012 19:10:19 +0000 (15:10 -0400)]
os: do not assume syscall.Write will write everything

Fixes #3323.

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

13 years agogo/build: do not report Target for local imports
Russ Cox [Thu, 15 Mar 2012 19:08:57 +0000 (15:08 -0400)]
go/build: do not report Target for local imports

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

13 years agolib/godoc: removing leading / from search links
Russ Cox [Thu, 15 Mar 2012 18:50:51 +0000 (14:50 -0400)]
lib/godoc: removing leading / from search links

srcLink includes the / now; adding another yields //,
which means something else entirely in URLs.

Fixes #3327.

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

13 years agodoc: add missing quotation mark
Stefan Nilsson [Thu, 15 Mar 2012 18:06:15 +0000 (14:06 -0400)]
doc: add missing quotation mark

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

13 years agonet/http: couple more triv.go modernizations
Brad Fitzpatrick [Thu, 15 Mar 2012 17:06:25 +0000 (10:06 -0700)]
net/http: couple more triv.go modernizations

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

13 years agodoc/play: use []rune insetead of []int.
Yasuhiro Matsumoto [Thu, 15 Mar 2012 08:28:07 +0000 (19:28 +1100)]
doc/play: use []rune insetead of []int.

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

13 years agocmd/godoc: add toys, tour button to playground
Andrew Gerrand [Thu, 15 Mar 2012 06:44:47 +0000 (17:44 +1100)]
cmd/godoc: add toys, tour button to playground

Fixes #3241.

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

13 years agoos: return some invented data from Stat(DevNull) on windows
Alex Brainman [Thu, 15 Mar 2012 05:33:45 +0000 (16:33 +1100)]
os: return some invented data from Stat(DevNull) on windows

Fixes #3321.

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

13 years agodoc: add "Godoc: documenting Go code" article
Francisco Souza [Thu, 15 Mar 2012 03:51:44 +0000 (14:51 +1100)]
doc: add "Godoc: documenting Go code" article

Originally published on The Go Programming Language Blog, March 31, 2011.

http://blog.golang.org/2011/03/godoc-documenting-go-code.html

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

13 years agonet/http: ensure triv.go compiles and runs
Robert Hencke [Thu, 15 Mar 2012 03:25:57 +0000 (20:25 -0700)]
net/http: ensure triv.go compiles and runs

R=golang-dev, bradfitz, dsymonds, dave, r
CC=golang-dev
https://golang.org/cl/5795069

13 years agocmd/godoc: use *goroot as base path in zip file
Andrew Gerrand [Thu, 15 Mar 2012 00:31:16 +0000 (11:31 +1100)]
cmd/godoc: use *goroot as base path in zip file

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

13 years agodoc: add reference to FAQ to explain warning about concrete type
Stefan Nilsson [Wed, 14 Mar 2012 22:15:16 +0000 (09:15 +1100)]
doc: add reference to FAQ to explain warning about concrete type

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

13 years agoarchive/zip: move r.zip off disk, into reader_test.go
Brad Fitzpatrick [Wed, 14 Mar 2012 21:41:06 +0000 (14:41 -0700)]
archive/zip: move r.zip off disk, into reader_test.go

Makes certain virus scanners happier.

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

13 years agogodoc: style example headings like links
Andrew Gerrand [Wed, 14 Mar 2012 21:09:54 +0000 (08:09 +1100)]
godoc: style example headings like links

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

13 years agogo/build: clearer argument name for Import (src -> srcDir)
Robert Griesemer [Wed, 14 Mar 2012 20:19:14 +0000 (13:19 -0700)]
go/build: clearer argument name for Import (src -> srcDir)

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

13 years agocmd/go: fix directory->import path conversion
Russ Cox [Wed, 14 Mar 2012 19:12:57 +0000 (15:12 -0400)]
cmd/go: fix directory->import path conversion

Fixes #3306.

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

13 years agoio/ioutil: fix crash when Stat fails
Russ Cox [Wed, 14 Mar 2012 18:47:13 +0000 (14:47 -0400)]
io/ioutil: fix crash when Stat fails

Fixes #3320.

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

13 years agoruntime: manage stack by ourselves for badcallback on windows/amd64
Shenghou Ma [Wed, 14 Mar 2012 18:24:49 +0000 (02:24 +0800)]
runtime: manage stack by ourselves for badcallback on windows/amd64
This function uses 48-byte of precious non-split stack for every callback
function, and without this CL, it can easily overflow the non-split stack.
I encountered this when trying to enable misc/cgo/test on windows/amd64.

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

13 years agocmd/go: trivial help message fix for go help get
Volker Dobler [Wed, 14 Mar 2012 16:49:57 +0000 (12:49 -0400)]
cmd/go: trivial help message fix for go help get

Direct reference to go help build where the flags are described.

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

13 years agoos: IsNotExist() should also consider ERROR_PATH_NOT_FOUND on Windows
Shenghou Ma [Wed, 14 Mar 2012 15:54:40 +0000 (23:54 +0800)]
os: IsNotExist() should also consider ERROR_PATH_NOT_FOUND on Windows
    Also update documentation about IsExist() and IsNotExist(), they are not
    about files only.

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

13 years agomisc/dist: don't lose mode bits when setting tar permissions
Brad Fitzpatrick [Wed, 14 Mar 2012 15:24:11 +0000 (08:24 -0700)]
misc/dist: don't lose mode bits when setting tar permissions

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

13 years agomisc/dist: remove exp and old before building
Andrew Gerrand [Wed, 14 Mar 2012 12:47:34 +0000 (23:47 +1100)]
misc/dist: remove exp and old before building

Fixes #3317.

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

13 years agomisc/vim: restore fileencodings.
Yasuhiro Matsumoto [Wed, 14 Mar 2012 07:43:01 +0000 (18:43 +1100)]
misc/vim: restore fileencodings.
Currently, ftdetect/gofiletype.vim set fileencodings to open the file as
utf-8 encoding event if the file does not contain multibyte characters.
But fileencodings is global option.

$ vim foo.txt
:set fileencodings
utf-8,ucs-bom,cp932

$ vim foo.go
:set fileencodings
utf-8

This change restore fileencodings before opening the file.
Also added specify fileformats=unix.

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

13 years agomisc/dist: force modes to 0755 or 0644 in tarballs
Andrew Gerrand [Wed, 14 Mar 2012 06:09:15 +0000 (17:09 +1100)]
misc/dist: force modes to 0755 or 0644 in tarballs

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

13 years agohtml/template: fix nil pointer bug
Rob Pike [Wed, 14 Mar 2012 04:08:54 +0000 (15:08 +1100)]
html/template: fix nil pointer bug
Fixes #3272.

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

13 years agoruntime/cgo: linux signal masking
Mikio Hara [Wed, 14 Mar 2012 04:07:25 +0000 (13:07 +0900)]
runtime/cgo: linux signal masking

Fixes #3314.
Fixes #3101 (again).

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

13 years agoruntime/cgo: darwin signal masking
Mikio Hara [Wed, 14 Mar 2012 03:49:59 +0000 (12:49 +0900)]
runtime/cgo: darwin signal masking

Fixes #3101 (again).

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

13 years agocmd/godoc: s/ignore/appengine/ in appinit.go +build constraint
Andrew Gerrand [Wed, 14 Mar 2012 03:02:59 +0000 (14:02 +1100)]
cmd/godoc: s/ignore/appengine/ in appinit.go +build constraint

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

13 years agogodoc: fix vet warnings for untagged struct literals
Andrew Gerrand [Wed, 14 Mar 2012 02:19:39 +0000 (13:19 +1100)]
godoc: fix vet warnings for untagged struct literals

src/cmd/godoc/filesystem.go:337:10: os.PathError struct literal uses untagged fields
src/cmd/godoc/filesystem.go:355:10: os.PathError struct literal uses untagged fields

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

13 years agodoc: add Go Concurrency Patterns: Timing out, moving on article
Francisco Souza [Wed, 14 Mar 2012 02:03:11 +0000 (13:03 +1100)]
doc: add Go Concurrency Patterns: Timing out, moving on article

Originally published on The Go Programming Language Blog, September 23, 2010.

http://blog.golang.org/2010/09/go-concurrency-patterns-timing-out-and.html

Update #2547.

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

13 years agoall: various typos
Robert Griesemer [Wed, 14 Mar 2012 00:29:07 +0000 (17:29 -0700)]
all: various typos

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

13 years agodoc: add Go image/draw package article and convert code snippets to Go1.
Johan Euphrosine [Wed, 14 Mar 2012 00:27:41 +0000 (11:27 +1100)]
doc: add Go image/draw package article and convert code snippets to Go1.

Originally published on The Go Programming Language Blog, September 29, 2011.

http://blog.golang.org/2011/09/go-imagedraw-package.html

Update #2547.

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

13 years agohtml/template: fix panic on Clone
Brad Fitzpatrick [Tue, 13 Mar 2012 23:55:43 +0000 (16:55 -0700)]
html/template: fix panic on Clone

Fixes #3281

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

13 years agotext/template: variables do not take arguments
Rob Pike [Tue, 13 Mar 2012 23:46:21 +0000 (10:46 +1100)]
text/template: variables do not take arguments

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

13 years agogo/printer, gofmt: fix multi-line logic
Robert Griesemer [Tue, 13 Mar 2012 23:15:58 +0000 (16:15 -0700)]
go/printer, gofmt: fix multi-line logic

A node spans multiple lines if the line difference
between start and end point is > 0 (rather than > 1).
Fixes some odd cases introduced by CL 5706055;
pointed out by dsymonds.

Added corresponding test case. The other change
in the .golden file reverts to the status before
the CL mentioned above and is correct.

gofmt -w src misc changes godoc.go back to where
it was before the CL mentioned above.

Fixes #3304.

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

13 years agofmt: remove dead code
Shenghou Ma [Tue, 13 Mar 2012 20:59:17 +0000 (04:59 +0800)]
fmt: remove dead code
     Also fix a typo in comment.

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

13 years agotext/template: fix a couple of parse bugs around identifiers.
Rob Pike [Tue, 13 Mar 2012 20:03:11 +0000 (07:03 +1100)]
text/template: fix a couple of parse bugs around identifiers.
1) Poor error checking in variable declarations admitted
$x=2 or even $x%2.
2) Need white space or suitable termination character
after identifiers, so $x+2 doesn't parse, in case we want it
to mean something one day.
Number 2 in particular prevents mistakes that we will have
to honor later and so is necessary for Go 1.

Fixes #3270.
Fixes #3271.

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

13 years agogo/build: fix match
Maxim Pimenov [Tue, 13 Mar 2012 14:00:43 +0000 (10:00 -0400)]
go/build: fix match

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

13 years agogc: use quoted string format in import error
Russ Cox [Tue, 13 Mar 2012 13:33:54 +0000 (09:33 -0400)]
gc: use quoted string format in import error

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

13 years agomake.bat: properly handle directories with spaces
Alex Brainman [Tue, 13 Mar 2012 05:50:44 +0000 (16:50 +1100)]
make.bat: properly handle directories with spaces

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/5797079

13 years agoos: remove document duplication in error predicate functions
Shenghou Ma [Tue, 13 Mar 2012 05:48:07 +0000 (13:48 +0800)]
os: remove document duplication in error predicate functions

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

13 years agotag weekly.2012-03-13
Andrew Gerrand [Tue, 13 Mar 2012 05:45:08 +0000 (16:45 +1100)]
tag weekly.2012-03-13

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

13 years agoweekly.2012-03-13 weekly.2012-03-13
Andrew Gerrand [Tue, 13 Mar 2012 05:39:52 +0000 (16:39 +1100)]
weekly.2012-03-13

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

13 years agodoc: update weekly notes, untag weekly
Andrew Gerrand [Tue, 13 Mar 2012 05:32:23 +0000 (16:32 +1100)]
doc: update weekly notes, untag weekly

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

13 years agogc: allow ~ in import paths
Rob Pike [Tue, 13 Mar 2012 05:03:19 +0000 (16:03 +1100)]
gc: allow ~ in import paths
Windows has paths like C:/Users/ADMIN~1. Also, it so happens
that go/parser allows ~ in import paths. So does the spec.
Fixes the build too.

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

13 years agomisc/dist: better archive/tar Headers
Brad Fitzpatrick [Tue, 13 Mar 2012 04:49:43 +0000 (21:49 -0700)]
misc/dist: better archive/tar Headers

This should live in archive/tar later (CL 5796073) but we
can always do that after Go 1 and stick it here for now.

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

13 years agogc: include full text of import path in error message
Rob Pike [Tue, 13 Mar 2012 04:35:08 +0000 (15:35 +1100)]
gc: include full text of import path in error message

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

13 years agomisc/dist: trim space from version string
Andrew Gerrand [Tue, 13 Mar 2012 04:31:39 +0000 (15:31 +1100)]
misc/dist: trim space from version string

This prevents us from writing filenames like "weekly.2012-03-12\n.foo.bar.tar.gz".

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

13 years agotag weekly.2012-03-12
Andrew Gerrand [Tue, 13 Mar 2012 04:12:05 +0000 (15:12 +1100)]
tag weekly.2012-03-12

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

13 years agoweekly.2012-03-12
Andrew Gerrand [Tue, 13 Mar 2012 04:09:51 +0000 (15:09 +1100)]
weekly.2012-03-12

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

13 years agodoc: increase h3 size
Andrew Gerrand [Tue, 13 Mar 2012 04:02:36 +0000 (15:02 +1100)]
doc: increase h3 size

This makes h3 and h4 more distinct, and h2 and h3 the same size.
The h2 and h3 styles may be distinguished h2's background styles.

This means that almost all text on the site is either 16px, 20px,
or 24px. (with a smattering of 14px)

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

13 years agodoc: windows zip archive installation instructions
Andrew Gerrand [Tue, 13 Mar 2012 04:02:14 +0000 (15:02 +1100)]
doc: windows zip archive installation instructions

Fixes #3254.

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

13 years agodoc: add Go's declaration syntax article
Francisco Souza [Tue, 13 Mar 2012 03:46:08 +0000 (14:46 +1100)]
doc: add Go's declaration syntax article

Originally published on The Go Programming Language Blog, July 7, 2010.

I did not put any go file in doc/progs. Shoul I include Go files
with those declarations?

http://blog.golang.org/2010/07/gos-declaration-syntax.html

Update #2547.

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

13 years agogo spec: fix inaccuracy in type identity definition
Robert Griesemer [Tue, 13 Mar 2012 03:27:27 +0000 (20:27 -0700)]
go spec: fix inaccuracy in type identity definition

Pointed out by Steven Blenkinsop (steven099@gmail.com)
via golang-nuts.

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

13 years agodoc: update reference gopher
Andrew Gerrand [Tue, 13 Mar 2012 02:43:41 +0000 (13:43 +1100)]
doc: update reference gopher

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

13 years agoruntime: fix windows/amd64 exception handler
Alex Brainman [Tue, 13 Mar 2012 02:42:55 +0000 (22:42 -0400)]
runtime: fix windows/amd64 exception handler

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

13 years agocmd/go: fix typo
Robert Hencke [Tue, 13 Mar 2012 02:41:15 +0000 (19:41 -0700)]
cmd/go: fix typo

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

13 years agogodoc: added alt and title attributes to the "pop out" button
Francisco Souza [Tue, 13 Mar 2012 01:57:48 +0000 (12:57 +1100)]
godoc: added alt and title attributes to the "pop out" button

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

13 years agobuild: update comment about GO_LDFLAGS.
David Symonds [Tue, 13 Mar 2012 01:52:15 +0000 (12:52 +1100)]
build: update comment about GO_LDFLAGS.
(5l/6l/8l aren't involved in building packages)

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

13 years agotest: actually run them on windows
Alex Brainman [Tue, 13 Mar 2012 01:51:28 +0000 (12:51 +1100)]
test: actually run them on windows

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

13 years agoos, syscall: windows really isn't posix compliant, fix os.IsExist()
Shenghou Ma [Tue, 13 Mar 2012 01:50:04 +0000 (12:50 +1100)]
os, syscall: windows really isn't posix compliant, fix os.IsExist()

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

13 years agodoc/progs: skip cgo1 and cgo2 on freebsd
Andrew Gerrand [Tue, 13 Mar 2012 00:55:16 +0000 (11:55 +1100)]
doc/progs: skip cgo1 and cgo2 on freebsd

FreeBSD's srandom has a different signature to darwin/linux.

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

13 years agogodoc: change link styles, add 'pop out' button
Andrew Gerrand [Tue, 13 Mar 2012 00:00:11 +0000 (11:00 +1100)]
godoc: change link styles, add 'pop out' button

Remove underlines from all links, show underline on link hover.
Change all non-link headings to h4, a slight visual cue.

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