1
0
mirror of https://github.com/golang/go synced 2024-10-04 16:31:22 -06:00
Commit Graph

1826 Commits

Author SHA1 Message Date
Andrew Gerrand
f0aeac1ac8 weekly.2012-03-12
R=golang-dev, nigeltao, bradfitz
CC=golang-dev
https://golang.org/cl/5783077
2012-03-13 15:09:51 +11:00
Andrew Gerrand
c9f1f56143 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
2012-03-13 15:02:36 +11:00
Andrew Gerrand
cf46040784 doc: windows zip archive installation instructions
Fixes #3254.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5794071
2012-03-13 15:02:14 +11:00
Francisco Souza
6033a48b77 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
2012-03-13 14:46:08 +11:00
Robert Griesemer
82fc28c0f5 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
2012-03-12 20:27:27 -07:00
Andrew Gerrand
881907730f doc: update reference gopher
R=golang-dev
CC=golang-dev
https://golang.org/cl/5754094
2012-03-13 13:43:41 +11:00
Francisco Souza
170301d44b godoc: added alt and title attributes to the "pop out" button
R=adg
CC=golang-dev
https://golang.org/cl/5777071
2012-03-13 12:57:48 +11:00
Andrew Gerrand
d2d7de974c 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
2012-03-13 11:55:16 +11:00
Andrew Gerrand
e8636a64a2 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
2012-03-13 11:00:11 +11:00
Andrew Gerrand
2b8bc93f32 godoc: use elastic layout for most pages
We use the absence of a Title to detect the front page.
I can't find other pages without titles, so this seems reasonable.

R=golang-dev, bradfitz, gri
CC=golang-dev
https://golang.org/cl/5797076
2012-03-13 10:17:10 +11:00
Francisco Souza
60b98d6208 doc: add C? Go? Cgo! article
Originally published on The Go Programming Language Blog, March 17, 2011.

http://blog.golang.org/2011/03/c-go-cgo.html

Update #2547.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5777054
2012-03-13 09:07:37 +11:00
Russ Cox
bf09a8c970 undo CL 5754088 / cae9a7c0db06
broke builders

««« original CL description
cmd/go: respect $GOBIN always

Before, we only consulted $GOBIN for source code
found in $GOROOT, but that's confusing to explain
and less useful.  The new behavior lets users set
GOBIN=$HOME/bin and have all go-compiled binaries
installed there.

Fixes #3269.

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

TBR=bradfitz
CC=golang-dev
https://golang.org/cl/5794065
2012-03-12 17:03:29 -04:00
Russ Cox
bccafa7210 cmd/go: respect $GOBIN always
Before, we only consulted $GOBIN for source code
found in $GOROOT, but that's confusing to explain
and less useful.  The new behavior lets users set
GOBIN=$HOME/bin and have all go-compiled binaries
installed there.

Fixes #3269.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5754088
2012-03-12 16:49:12 -04:00
Jeremy Jackins
959d0c7ac0 doc: fix typo in contribute.html
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5795050
2012-03-10 15:13:34 -08:00
Russ Cox
a40065ac68 cmd/godoc: add support for serving templates
doc: convert to use godoc built-in templates

tmpltohtml is gone, to avoid having a second copy of the code.
Instead, godoc -url /doc/go1.html will print the actual HTML
served for that URL.  "make" will generate files named go1.rawhtml
etc, which can be fed through tidy.

It can be hard to tell from the codereview diffs, but all the
tmpl files have been renamed to be html files and then
have "Template": true added.

R=golang-dev, adg, r, gri
CC=golang-dev
https://golang.org/cl/5782046
2012-03-08 08:39:20 -05:00
Andrew Gerrand
5ca13f6378 doc: fix metadata in go_mem.html
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5781053
2012-03-08 22:50:05 +11:00
Andrew Gerrand
b6618c118f doc: drop google +1 button from the home page
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5784048
2012-03-08 17:31:20 +11:00
Robert Griesemer
11d8b155ce go_spec: no known implementation differences anymore
R=r, rsc, iant, ken
CC=golang-dev
https://golang.org/cl/5781048
2012-03-07 22:17:40 -08:00
Rob Pike
1cd272d16a doc/go1: template packages have changed since r60
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5787049
2012-03-08 17:15:23 +11:00
Andrew Gerrand
c9836be112 doc: link to go1 and go1compat from docs index
Fixes #3239.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5782049
2012-03-08 16:10:55 +11:00
Andrew Gerrand
70db237169 doc: add go command notes to the Go 1 doc
Fixes #2912.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5783048
2012-03-08 16:09:49 +11:00
Andrew Gerrand
94f233574b doc: pngcrush and remove old, unused images
R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/5758047
2012-03-08 14:18:28 +11:00
Shenghou Ma
d56e0e7e94 doc: fix freebsd build
Also rename it to test.bash, for naming consistency.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5784045
2012-03-08 12:04:49 +09:00
Andrew Gerrand
cfe007e1b6 doc: link to sub-repositories from reference page
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5752049
2012-03-08 13:36:38 +11:00
Alex Brainman
a93047aa72 doc/go1.tmpl: small change left behind from abf39116ffac
R=r
CC=golang-dev
https://golang.org/cl/5752072
2012-03-08 10:01:15 +11:00
Shenghou Ma
6b770f05ad doc/go_mem: init-created goroutine behavior changes for Go 1
They can start execution even before all init functions end.

R=rsc, r, adg
CC=golang-dev
https://golang.org/cl/5732061
2012-03-08 03:56:31 +08:00
Russ Cox
a6ce691bd4 doc: give up on OS X Leopard
Fixes #3206.

R=golang-dev, gri, bradfitz
CC=golang-dev
https://golang.org/cl/5769046
2012-03-07 13:57:57 -05:00
Russ Cox
562bccf89e doc: update effective_go.tmpl
Forgot this half in https://golang.org/cl/5764044

R=gri
CC=golang-dev
https://golang.org/cl/5770044
2012-03-07 11:57:54 -05:00
Russ Cox
e8d1852d6a doc: update Effective Go init section
Goroutines are no longer excluded from init.

Fixes #3232.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5764044
2012-03-07 11:38:39 -05:00
Russ Cox
40807282ac doc: delete faq question about 6g
Fixes #3230.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5753071
2012-03-07 11:37:56 -05:00
Alex Brainman
5aee1f3a0f exp/wingui: getting relocated to
go get code.google.com/p/gowingui

R=golang-dev, minux.ma, r
CC=golang-dev
https://golang.org/cl/5752067
2012-03-07 17:48:09 +11:00
Rob Pike
0130a31366 go_faq: a simple binary is a little smaller now
About 10% for hello, world.
Maybe more reductions will come.
Also clarify that we're comparing printf against Printf
(gcc can optimize aggressively, making this a different
sort of comparison).

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5756070
2012-03-07 15:29:26 +11:00
Ian Lance Taylor
25f15d5f22 doc: add note about import . to Go 1 compatibility notes
R=r
CC=golang-dev
https://golang.org/cl/5752065
2012-03-06 17:50:11 -08:00
Johan Euphrosine
26dc17ce78 doc: fix typos in laws_of_reflection article, add copyright notice.
Update #2547.

R=golang-dev, minux.ma, r, r, adg
CC=golang-dev
https://golang.org/cl/5755051
2012-03-07 11:24:00 +11:00
Shenghou Ma
97b13acb67 doc: update links
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5754051
2012-03-07 08:15:47 +11:00
Shenghou Ma
efbd79ce5a doc: remove unsued progs and makehtml script, update progs/run
Due to removal of go_tutorial, unused programs are removed.
        makehtml is unnecessary (it also gives wrong messages when
        the destination file doesn't exist)
        progs/run now compiles all remaining programs under doc/progs.
        Fixes #3076 (again)

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5755053
2012-03-07 08:05:10 +11:00
Andrew Gerrand
73b8ccb0b0 doc: add "The go command" article based on Russ' mail
This is a philosophical document. We can soup it up at a later stage,
but for now it's nice to have a URL to point to that isn't a mailing
list post.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5676061
2012-03-07 07:40:21 +11:00
Andrew Gerrand
f35fa85a3f doc/gopher: flip frontpage gopher's eyes
R=r, r
CC=golang-dev
https://golang.org/cl/5759045
2012-03-06 16:56:30 +11:00
Andrew Gerrand
d70627e5d0 doc: update install docs for Windows and Go 1, add golang-announce to /project
R=golang-dev, bradfitz, r, rsc
CC=golang-dev
https://golang.org/cl/5758044
2012-03-06 15:16:02 +11:00
Andrew Gerrand
f200b72a7c doc: add more gophers
R=golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/5753047
2012-03-06 12:50:52 +11:00
Andrew Gerrand
80cb47b706 doc: fix download link on front page
R=golang-dev
CC=golang-dev
https://golang.org/cl/5730053
2012-03-05 17:07:10 +11:00
Andrew Gerrand
56208edb8d weekly.2012-03-04
R=golang-dev, dsymonds, bradfitz, minux.ma
CC=golang-dev
https://golang.org/cl/5732058
2012-03-05 15:45:50 +11:00
Andrew Gerrand
a22b0f82a2 doc: add command docs page, canonicalize reference paths
R=golang-dev, kyle, r
CC=golang-dev
https://golang.org/cl/5728055
2012-03-05 15:30:27 +11:00
Andrew Gerrand
539178bd01 doc: add help page, update project page
R=golang-dev, kyle, r, bradfitz
CC=golang-dev
https://golang.org/cl/5729053
2012-03-05 15:07:43 +11:00
Andrew Gerrand
f78d50c6e5 doc: clean up docs page, refer to wiki, change install doc paths
R=golang-dev, minux.ma, r
CC=golang-dev
https://golang.org/cl/5728051
2012-03-05 14:31:27 +11:00
Rob Pike
f5a1dd888d doc/progs: update for go 1
Fixes #3076.

R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/5727056
2012-03-05 12:49:31 +11:00
Shenghou Ma
4d7017dcd0 doc/effective_go: minor fix
We have 'gofmt' and 'go fmt', but not 'go tool fmt'.

R=golang-dev, kyle, r
CC=golang-dev
https://golang.org/cl/5739043
2012-03-05 11:12:58 +11:00
Andrew Gerrand
d1e726c583 doc: change menu, tweak front page
R=golang-dev, kyle, r
CC=golang-dev
https://golang.org/cl/5729052
2012-03-05 10:34:22 +11:00
Francisco Souza
54875a7a7f doc: fix another typo in article on defer, panic and recover
Fixes #3177

R=adg
CC=golang-dev
https://golang.org/cl/5728057
2012-03-04 14:40:14 +11:00
Francisco Souza
b1b0b73738 doc: fixed minor typo in article on defer
Fixes #3176.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5737043
2012-03-04 11:34:21 +11:00
Andrew Gerrand
120c223822 doc: remove roadmap document
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5726047
2012-03-03 12:53:37 +11:00
Andrew Gerrand
aabf2ee8e1 doc: change wording on references page
R=golang-dev
CC=golang-dev
https://golang.org/cl/5728050
2012-03-03 12:48:35 +11:00
Rob Pike
95d7d3d658 doc/install-source.html: update for go tool
Make some updates, get rid of mentions of make.
There remain a number of open questions.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5720057
2012-03-03 09:36:09 +11:00
Shenghou Ma
6a005cb03f doc/go1: minor corrections
Set dagger looks very much like t in some fonts, so superscript it.
        os/signal is no longer in exp.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5720049
2012-03-03 00:47:11 +08:00
Sanjay Menakuru
4d7d3f5328 doc: fix some HTML errors in code.html
R=golang-dev, rsc
CC=adg, golang-dev
https://golang.org/cl/5720050
2012-03-02 11:29:09 -05:00
Andrew Gerrand
718de6f4c6 doc: expand code.html to discuss the go tool in more depth
R=golang-dev, balasanjay, r
CC=golang-dev
https://golang.org/cl/5640045
2012-03-02 15:35:36 +11:00
Andrew Gerrand
47d614e667 doc: update go1 for html changes
R=golang-dev, rsc, r
CC=golang-dev
https://golang.org/cl/5713054
2012-03-02 11:52:46 +11:00
Russ Cox
9996f7f17a doc: describe API changes to go/build
R=golang-dev, gri, r
CC=golang-dev
https://golang.org/cl/5711059
2012-03-01 18:17:28 -05:00
Robert Griesemer
103c9db747 spec: clarifications around exports, uniqueness of identifiers
- Define what it means for two identifiers to be unique.

- The current spec is incorrect about exported
identifiers: for instance, it excluded fields
of non-exported types of exported variables
from being exported. It is easier to leave
the detailed specification away and let the
rest of the spec govern access of exported
identifiers.

- The current spec is incorrect about qualified
identifiers: It simply required that an identifier
be exported to be valid in a qualified identifier.
However, qualified identifiers can only access
exported identifiers declared in the package
block of the imported package.

Fixes #1551.

R=r, rsc, iant, ken
CC=golang-dev
https://golang.org/cl/5711043
2012-03-01 13:57:49 -08:00
Robert Griesemer
953f2dec89 spec: minor tweaks
- more idiomatic examples of pointer types
- show use of _ in examples of function types
- remove "legal:" qualification in examples
  for consistency

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5711054
2012-03-01 10:35:15 -08:00
Shenghou Ma
cb6c09a75a doc: update link to self-hosted "The Laws of Reflection" article
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5717046
2012-03-01 14:54:35 +08:00
Stefan Nilsson
c50074e510 doc: add a bunch of missing <p> tags
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5707065
2012-02-29 15:07:52 -08:00
Johan Euphrosine
6652b0b866 doc: add The Laws of Reflection article
Originally published on The Go Programming Language Blog, September 6, 2011.

http://blog.golang.org/2011/09/laws-of-reflection.html

Update #2547

R=golang-dev, r, adg
CC=golang-dev
https://golang.org/cl/5689054
2012-03-01 10:05:51 +11:00
Russ Cox
8e38b17a90 spec: apply method sets, embedding to all types, not just named types
When we first wrote the method set definition, we had long
discussions about whether method sets applied to all types
or just named types, and we (or at least I) concluded that it
didn't matter: the two were equivalent points of view, because
the only way to introduce a new method was to write a method
function, which requires a named receiver type.

However, the addition of embedded types changed this.
Embedding can introduce a method without writing an explicit
method function, as in:

        var x struct {
                sync.Mutex
        }

        var px *struct {
                sync.Mutex
        }

        var _, _ sync.Locker = &x, px

The edits in this CL make clear that both &x and px satisfy
sync.Locker.  Today, gccgo already works this way; 6g does not.

R=golang-dev, gri, iant, r
CC=golang-dev
https://golang.org/cl/5702062
2012-02-29 15:54:06 -05:00
Russ Cox
0201e373e5 spec: shorten heading for complex, real, imag
In the current TOC it sticks out quite a bit.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5705053
2012-02-29 15:20:11 -05:00
Robert Griesemer
7c1cb37b55 spec: use the term "lexical token" (rather then "lexical symbol")
Fix for minor inconsistency.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5709058
2012-02-29 10:39:20 -08:00
Robert Griesemer
da633714fd spec: fix sentence
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5706065
2012-02-29 09:06:05 -08:00
Andrew Gerrand
5fea39d0b4 doc: remove Go for C++ Programmers
Now available at the Go Wiki:
http://code.google.com/p/go-wiki/wiki/GoForCPPProgrammers

Fixes #2913.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5705049
2012-02-29 13:23:07 +11:00
Robert Griesemer
2c9e1637d2 go spec: inside functions, variables must be evaluated.
Fixes #1612.

R=r, rsc, iant, ken, remyoudompheng, ken, r
CC=golang-dev
https://golang.org/cl/5700068
2012-02-28 17:44:24 -08:00
Ian Lance Taylor
b69fa69a8b doc: update Go For C++ Programmers
Minor cleanups to look more like current Go.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5707053
2012-02-28 16:49:57 -08:00
Rob Pike
9e7e6d9ea4 doc/go1: tweaks to address rsc's comments
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5706054
2012-02-29 11:29:33 +11:00
Stefan Nilsson
bfdc3baa1e doc/style.css: make selectors more selective.
Change #foo to div#foo to avoid selecting headings
with anchor foo, such as <h1 id="foo">.

(A more extensive change would be to use class
selectors for styling. Perhaps this is better, since id:s
should be unique within a document according to
http://www.w3.org/TR/CSS2/selector.html#id-selectors)

R=golang-dev, gri, adg
CC=golang-dev
https://golang.org/cl/5702044
2012-02-29 09:38:58 +11:00
Rob Pike
7201b0c27c tutorial: delete
Instead we'll point people at the Tour and beef up code.html.

Fixes #3107.

R=golang-dev, bradfitz, r, adg
CC=golang-dev
https://golang.org/cl/5697077
2012-02-28 13:35:58 +11:00
Stefan Nilsson
4fae9f7943 doc/go1: fix broken link
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5695072
2012-02-28 09:22:55 +11:00
Rob Pike
cc7e11c91e doc/go1: mention that regexp has changed
Also restore alphabetical order.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5701053
2012-02-27 14:34:16 +11:00
Andrew Gerrand
e10dc82ce0 doc: instruct freebsd/linux users to rm the old version first
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5701052
2012-02-27 14:16:56 +11:00
Andrew Gerrand
cd1a2f7e74 doc: move wiki tutorial into articles directory, rmdir doc/codelab
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5701050
2012-02-27 11:25:43 +11:00
Rob Pike
68c7e8a2f4 doc/go1: add justification discussions to major changes
Fixes #3086.

R=golang-dev, gri, r, kevlar
CC=golang-dev
https://golang.org/cl/5700067
2012-02-27 07:31:34 +11:00
Shenghou Ma
f7ad1834ea doc/install: fix FreeBSD/Linux install command
R=adg, golang-dev, go.peter.90, rsc
CC=golang-dev
https://golang.org/cl/5700062
2012-02-26 01:40:29 +08:00
Mike Rosset
4af3dda41b doc: update Go1 release notes to use correct WalkFunc error signature.
filepath's WalkFunc handler now uses errors package, and not
os.Error

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5696067
2012-02-24 22:17:21 -08:00
Rob Pike
b36d25f197 doc/go1: new introduction
This distills the motivational discussion and makes it the introduction to the release notes.
After this lands, I'll expand the discussion of the major changes to include more background.

Updates #3086.

R=golang-dev, gri, rsc
CC=golang-dev
https://golang.org/cl/5698057
2012-02-25 08:02:35 +11:00
Shenghou Ma
52cd4c8610 doc: update codelab/wiki to Go 1.
R=golang-dev, r, adg
CC=golang-dev
https://golang.org/cl/5683076
2012-02-25 01:09:05 +08:00
Russ Cox
fad10f9c1c spec: allow disallow of \uFFFD in import path
Turns out U+FFFD is a graphic character too.

http://play.golang.org/p/YblCfKAfko

R=gri
CC=golang-dev
https://golang.org/cl/5699052
2012-02-23 22:46:04 -05:00
Rob Pike
5cff029993 doc/go1: document ProcessState
Also reformat the "go fix" references to make them look better by using the non-CW space.

Fixes #3087.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5695057
2012-02-24 13:08:11 +11:00
Robert Griesemer
54eec3db2c godoc: fine-tuning .css
R=adg
CC=golang-dev
https://golang.org/cl/5699057
2012-02-23 17:42:14 -08:00
Robert Griesemer
5b30306fa8 godoc: bring back highlighting, selections, and alerts
R=adg, rsc
CC=golang-dev
https://golang.org/cl/5695054
2012-02-23 14:54:10 -08:00
Robert Griesemer
ac4055b2c5 go spec: import path implementation restriction
R=rsc, r, r, adg
CC=golang-dev
https://golang.org/cl/5688074
2012-02-22 23:51:25 -08:00
Andrew Gerrand
6419bbbfd3 weekly.2012-02-22
R=golang-dev, r, bradfitz
CC=golang-dev
https://golang.org/cl/5698043
2012-02-23 16:40:13 +11:00
Rob Pike
818e3cdb09 spec: refine the wording about variables in type switches
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5686064
2012-02-22 16:25:55 +11:00
David Symonds
6d35302704 cmd/fix: remove os.Wait gofix.
The os.Wait function has been removed entirely, so there's no point in fixing code that called it.

R=r
CC=golang-dev
https://golang.org/cl/5685078
2012-02-22 15:46:31 +11:00
Andrew Gerrand
8d29a09707 doc: move styles to style.css
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5685075
2012-02-22 15:02:31 +11:00
Russ Cox
9c08d65084 spec: make all comparison results untyped bool
Or, depending on your point of view, make the
comparisons satisfy any surrounding boolean type.

Also, fix a few foo_bar -> fooBar in code fragments.

Fixes #2561.

R=golang-dev, r, bradfitz, gri, iant, kevlar
CC=golang-dev
https://golang.org/cl/5671096
2012-02-21 22:04:30 -05:00
Andrew Gerrand
43cfbb0fb5 godoc: adjust line height in pre blocks
R=gri, dsymonds
CC=golang-dev
https://golang.org/cl/5687071
2012-02-22 12:45:01 +11:00
Andrew Gerrand
9a26a7822e godoc: fix playground url
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5685070
2012-02-22 10:09:34 +11:00
Andrew Gerrand
1a1940c870 doc: support redirect-on-share
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5689056
2012-02-22 09:16:54 +11:00
Andrew Gerrand
01156f05de doc: fix links in installation instructions
Fixes #3051.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5683056
2012-02-21 14:12:07 +11:00
Andrew Gerrand
10689cddba doc: link to self-hosted articles from docs.html
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5685061
2012-02-21 13:59:51 +11:00
Rob Pike
6ba77ecb6a doc/go1: delete obsolete reference to FileStat
Fixes #3013.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5683049
2012-02-21 08:03:03 +11:00
Rob Pike
b5a3bd5ff6 os: drop the Wait function and the options to Process.Wait
They are portability problems and the options are almost always zero in practice anyway.

R=golang-dev, dsymonds, r, bradfitz
CC=golang-dev
https://golang.org/cl/5688046
2012-02-20 15:36:08 +11:00
Rob Pike
5cff1903ea FAQ: many small fixes and adjustments
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5685048
2012-02-20 12:42:50 +11:00
Russ Cox
72f5a91aa3 doc/go1: update for runtime, unsafe API changes
Fixes #2890.

R=golang-dev, r, remyoudompheng
CC=golang-dev
https://golang.org/cl/5683044
2012-02-19 18:04:38 -05:00
Bobby Powers
d5b28ad2b6 doc: update contrib.html
Fix all the local links, as contrib.html is served as
/project/

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5656105
2012-02-20 08:33:28 +11:00
Rob Pike
fa9c44d831 doc/install.html: fix link
Fixes #3072.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5684044
2012-02-20 08:08:30 +11:00
Russ Cox
1a0c8fe9bb cmd/cgo: bug fixes
* disallow embedding of C type (Fixes issue 2552)
* detect 0-length array (Fixes issue 2806)
* use typedefs when possible, to avoid attribute((unavailable)) (Fixes issue 2888)
* print Go types constructed from C types using original C types (Fixes issue 2612)

This fix changes _cgo_export.h to repeat the preamble from import "C".
Otherwise the fix to issue 2612 is impossible, since it cannot refer to
types that have not been defined.  If people are using //export and
putting non-header information in the preamble, they will need to
refactor their code.

R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/5672080
2012-02-19 13:32:55 -05:00
Marcel van Lohuizen
72fb81eeb6 doc: Fixed type in documentation for FormatFloat.
R=r, r, rsc
CC=golang-dev
https://golang.org/cl/5656108
2012-02-19 19:26:05 +01:00
Brad Fitzpatrick
efacb2a1b4 os: remove Getenverror
Fixes #3065

R=golang-dev, dsymonds, rsc
CC=golang-dev
https://golang.org/cl/5675094
2012-02-18 21:18:13 -08:00
Rob Pike
c3ef198020 go 1: add a description of the os error changes.
I'm sure I wrote these before but they've disappeared.

R=golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/5673100
2012-02-19 14:15:26 +11:00
Ian Lance Taylor
253c139275 doc: update gccgo_contribute.html
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5673080
2012-02-18 11:15:52 -08:00
Shenghou Ma
f18b0b0c16 doc: various updates to doc/code.html
R=golang-dev, adg, r
CC=golang-dev
https://golang.org/cl/5649068
2012-02-18 16:13:02 +11:00
Russ Cox
5c3de8ccb3 doc: fix tables
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5676084
2012-02-17 16:59:33 -05:00
Ian Lance Taylor
ebc4007708 doc: clarify gccgo support for segmented stacks
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5671081
2012-02-17 05:59:15 -08:00
Rob Pike
1e0f97ac65 faq: add entry about nil interfaces vs. nil pointers
Fixes #2778.

R=bradfitz, rsc, iant, adg
CC=golang-dev
https://golang.org/cl/5672078
2012-02-17 16:27:17 +11:00
Mike Rosset
91672686da doc: provide example filepath.Walk for go1
R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/5674067
2012-02-17 12:45:55 +11:00
Rob Pike
56069f0333 os: delete os.EINVAL and so on
The set of errors forwarded by the os package varied with system and
was therefore non-portable.
Three helpers added for portable error checking: IsExist, IsNotExist, and IsPermission.
One or two more may need to come, but let's keep the set very small to discourage
thinking about errors that way.

R=mikioh.mikioh, gustavo, r, rsc
CC=golang-dev
https://golang.org/cl/5672047
2012-02-17 10:04:29 +11:00
Robert Griesemer
3908467b1f go spec: struct comparison only compares non-blank fields
Fixes #3031.

R=golang-dev, rsc, r, iant
CC=golang-dev
https://golang.org/cl/5676054
2012-02-16 14:13:17 -08:00
David Symonds
8342793e7b net/url: Rename ParseWithReference to ParseWithFragment.
Updates #2946.

R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/5671061
2012-02-16 15:56:03 +11:00
Nigel Tao
da8f037b57 fix: add fix for bufio, gzip, zlib NewWriterXxx changes.
Fixes #2979.

R=rsc, r
CC=golang-dev
https://golang.org/cl/5664046
2012-02-15 14:41:47 +11:00
Andrew Gerrand
eccc22e542 doc: fix snapshot notes
R=bradfitz, dsymonds
CC=golang-dev
https://golang.org/cl/5675056
2012-02-15 14:20:21 +11:00
Andrew Gerrand
d2f65a6461 weekly.2012-02-14
R=golang-dev, dsymonds, r, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5675055
2012-02-15 14:15:33 +11:00
Lai Jiangshan
932cdfbc4c doc: fix codewalk/markov.go
When I build it, I got:
/home/njubee/work/golang/doc/codewalk/markov.go:124: undefined: time.Nanoseconds
time.Nanoseconds() does not exist now, use time.Now().UnixNano() instead

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5668044
2012-02-15 13:07:34 +11:00
Andrew Gerrand
3509687d6a doc: add playground.js
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5649087
2012-02-15 12:59:50 +11:00
Andrew Gerrand
dd91d83d24 doc: add App Engine docs to 'learn' and 'reference' pages
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5672048
2012-02-15 12:58:40 +11:00
Andrew Gerrand
a50315304d doc: grey out line numbers
R=gri
CC=golang-dev
https://golang.org/cl/5675049
2012-02-15 10:31:28 +11:00
Adam Langley
c2e58dc568 go1.tmpl: fix merge
hg massively messed up a simple merge for 9d7addec2635 in what I can
only imagine was a public service announcement that everyone should
use git.

R=golang-dev
CC=golang-dev
https://golang.org/cl/5668043
2012-02-14 07:13:57 -05:00
Andrew Gerrand
e07f089cb0 doc: update install.html for binary distros, add install-source.html
R=bsiegert, rsc, r
CC=golang-dev
https://golang.org/cl/5605047
2012-02-14 17:02:28 +11:00
Andrew Gerrand
5ab935f68a godoc: list examples in index
Fixes #2897.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5658047
2012-02-14 14:52:00 +11:00
Andrew Gerrand
763716ae2a doc: color comments
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5657047
2012-02-14 11:45:27 +11:00
Andrew Gerrand
04868b28ac archive/zip: hide Write method from *Writer type
This was an implementation detail that snuck into the public interface.
*Writer.Create gives you an io.Writer, the *Writer itself was never
meant to be written to.

R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/5654076
2012-02-14 10:47:48 +11:00
Ian Lance Taylor
9126c6570c spec: clarify implementation restrictions on untyped floats
Drop reference to "machine type."  Specify that integer
overflow must be an error.  Drop requirement that exponent
must be 128 bits--that's a lot.  Clarify that floating point
expressions may be rounded, including intermediate values.

This is a reworking of https://golang.org/cl/5577068/ .

Fixes #2789.

R=r, rsc, r, gri, ken, ken, iant
CC=golang-dev, remyoudompheng
https://golang.org/cl/5655049
2012-02-13 11:25:56 -08:00
Russ Cox
35586f718c os/signal: selective signal handling
Restore package os/signal, with new API:
Notify replaces Incoming, allowing clients
to ask for certain signals only.  Also, signals
go to everyone who asks, not just one client.

This could plausibly move into package os now
that there are no magic side effects as a result
of the import.

Update runtime for new API: move common Unix
signal handling code into signal_unix.c.
(It's so easy to do this now that we don't have
to edit Makefiles!)

Tested on darwin,linux 386,amd64.

Fixes #1266.

R=r, dsymonds, bradfitz, iant, borman
CC=golang-dev
https://golang.org/cl/3749041
2012-02-13 13:52:37 -05:00
Adam Langley
cdd7e02583 crypto/...: more fixes for bug 2841
1) Remove the Reset() member in crypto/aes and crypto/des (and
   document the change).
2) Turn several empty error structures into vars. Any remaining error
   structures are either non-empty, or will probably become so in the
   future.
3) Implement SetWriteDeadline for TLS sockets. At the moment, the TLS
   status cannot be reused after a Write error, which is probably fine
   for most uses.
4) Make crypto/aes and crypto/des return a cipher.Block.

R=rsc, r
CC=golang-dev
https://golang.org/cl/5625045
2012-02-13 12:38:45 -05:00
Rob Pike
7bd6ebb104 spec: strings are more slices than arrays
Thanks to Aaron Kemp for noticing.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5645097
2012-02-13 23:39:56 +11:00
Andrew Gerrand
d84de09e1d godoc: new design
This is not the finished product,
but a good checkpoint from which to
proceed with further development.

R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/5571061
2012-02-13 21:22:36 +11:00
Russ Cox
878153682e cmd/fix: warn about exp, old, deleted packages
Fixes #2776.

There was a previous attempt at CL 5592043 but that
seems to have stalled.  This one is simpler, and more up to date
(correct handling of spdy, for example).

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5645091
2012-02-12 23:55:33 -05:00
Robert Griesemer
b1d9ae9406 go spec: method names must be unique
Fixes #2916.

R=golang-dev, remyoudompheng, r, rsc
CC=golang-dev
https://golang.org/cl/5652064
2012-02-12 20:03:30 -08:00
Rob Pike
8040f9bb86 spec: typographical adjustment for ellipsis
The paragraph describing the ellipses presents the horizontal ellipsis
in two different fonts and at least on my screen they look too different.
Switch to a consistent rendering.

Of small steps are great journeys undertaken.

R=golang-dev, rsc, dsymonds, gri
CC=golang-dev
https://golang.org/cl/5650055
2012-02-13 14:38:31 +11:00
Rob Pike
aee1c38cda go1: fix old reference to Sys method
The example was fixed; the simplifying rewrite was missed.

R=golang-dev
CC=golang-dev
https://golang.org/cl/5651080
2012-02-13 08:05:53 +11:00
Rob Pike
46dc76f5da go1: update recipe for recovering Stat_t
Fixes #2983.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5654063
2012-02-12 09:17:57 +11:00
Rob Pike
14efdea359 effective_go: use new map deletion syntax
Fixes #2984.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5652071
2012-02-12 09:11:44 +11:00
Nigel Tao
22636be8b0 flate: delete WrongValueError type.
Fixes #2838.

R=rsc, r
CC=golang-dev
https://golang.org/cl/5651060
2012-02-11 12:09:11 +11:00
Robert Griesemer
f8cf82f6f2 go/printer: implement SourcePos mode
If a printer is configured with the SourcePos mode
set, it will emit //-line comments as necessary to
ensure that the result - if reparsed - reflects the
original source position information.

This change required a bit of reworking of the
output section in printer.go. Specifically:

- Introduced new Config mode 'SourcePos'.

- Introduced new position 'out' which tracks the
position of the generated output if it were read
in again. If there is a discrepancy between out
and the current AST/source position, a //line
comment is emitted to correct for it.

- Lazy emission of indentation so that //line
comments can be placed correctly. As a result,
the trimmer will have to do less work.

- Merged writeItem into writeString.

- Merged writeByteN into writeByte.

- Use a []byte instead of a byte.Buffer both in the
printer and in the trimmer (eliminates dependency).

Also: introduced explicit printer.Mode type (in
sync w/ parser.Mode, scanner.Mode, etc.)

Runs all tests. Applied gofmt to src, misc w/o changes.

Fixes #1047.
Fixes #2697.

R=rsc, rsc
CC=golang-dev
https://golang.org/cl/5643066
2012-02-10 13:27:32 -08:00
Nigel Tao
cc9ed447d0 compress: make flate, gzip and zlib's NewWriterXxx functions all return
(*Writer, error) if they take a compression level, and *Writer otherwise.
Rename gzip's Compressor and Decompressor to Writer and Reader, similar to
flate and zlib.

Clarify commentary when writing gzip metadata that is not representable
as Latin-1, and fix io.EOF comment bug.

Also refactor gzip_test to be more straightforward.

Fixes #2839.

R=rsc, r, rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5639057
2012-02-10 18:49:19 +11:00
Rob Pike
cbd6c34131 testing/script: delete
Dead code.

Fixes #2961.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5650053
2012-02-10 14:31:08 +11:00
Brad Fitzpatrick
4152b43457 os: delete Exec, NewFile takes uintptr, rename ShellExpand, doc fixes
Delete O_NDELAY, O_NONBLOCK, O_NOCTTY, O_ASYNC.

Clean up some docs.

Rename ShellExpand -> ExpandEnv.

Make NewFile take a uintptr; change File.Fd to return one.
(for API compatibility between Unix and Windows)

Fixes #2947

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5655045
2012-02-10 14:16:15 +11:00
Brad Fitzpatrick
7750fc894a os: remove Time; callers should use time.Time.
Part of issue 2947

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5651051
2012-02-10 11:44:51 +11:00
Rob Pike
1c1ecd7473 log/syslog: fix documentation for NewLogger
Fixes #2798.

R=golang-dev, bradfitz, r, rsc, rsc
CC=golang-dev
https://golang.org/cl/5642071
2012-02-09 14:40:56 +11:00
Rob Pike
8c4a2ca83b encoding/binary: add Size, to replace the functionality of the old TotalSize
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5644063
2012-02-09 11:26:03 +11:00
Rob Pike
68794e7910 doc: new document about compatibility of releases
The doc is not linked anywhere yet; that will come later.

R=golang-dev, adg, gri, rsc, edsrzf
CC=golang-dev
https://golang.org/cl/5647050
2012-02-09 09:42:40 +11:00
Russ Cox
7c5d6409f5 spec: address CL 5647054 comments
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5641057
2012-02-08 15:37:58 -05:00
Russ Cox
e7a138b856 spec: send on closed channel counts as "proceeding"
Other wordings are possible but defining this as one
of the ways to proceed means we don't have to add
language about this to the description of select.

Fixes #2825.

R=golang-dev, gri, r
CC=golang-dev
https://golang.org/cl/5643062
2012-02-08 15:24:48 -05:00
Rob Pike
cf80ccd8f6 doc/go1: mention that the compiler catches TotalSize and NewReaderSize
Today is Size day and the compiler will reject old code using these functions.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5644053
2012-02-09 07:09:52 +11:00
Robert Griesemer
d08dd8bec1 go/scanner: clean up error interface
Issue 2856 asks for a rename of a few methods to a
more idiomatic Go style. This is a very early API
that evolved organically throughout the years.
Together with the fact that ErrorVectors were embedded
in other data structures (e.g. Parser), just renaming
methods (e.g. GetError -> Error) would lead to undesired
behavior (e.g., Parser would act like an Error). Instead,
cleaned up API a bit more:

- removed ErrorVector in favor of ErrorList (already
present)
- simplified Scanner.Init by making the error handler a
function instead of requiring an ErrorHandler implementation
- adjusted helper functions accordingly
- updated Go 1 doc

Fixes #2856.

R=rsc
CC=golang-dev
https://golang.org/cl/5624047
2012-02-08 11:41:32 -08:00
Russ Cox
388816ae07 spec: disallow recursive embedded interfaces
Fixes #1814.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5647054
2012-02-08 14:35:00 -05:00
Russ Cox
fd2a511253 spec: add forward links from 'method set' to where it gets used
Fixes #1797.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5645058
2012-02-08 14:28:51 -05:00
Russ Cox
d0dc68901a net/http: panic on duplicate registrations
Otherwise, the registration semantics are
init-order-dependent, which I was trying very hard
to avoid in the API.  This may break broken programs.

Fixes #2900.

R=golang-dev, r, bradfitz, dsymonds, balasanjay, kevlar
CC=golang-dev
https://golang.org/cl/5644051
2012-02-08 13:50:00 -05:00
Andrew Gerrand
d3f8f0c258 weekly.2012-02-07
R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/5615056
2012-02-08 14:37:47 +11:00
Rob Pike
52ebadd356 encoding/binary: hide TotalSize
The function has a bizarre signature: it was the only public function there
that exposed the reflect package. Also, its definition is peculiar and hard to
explain. It doesn't merit being exported.

This is an API change but really, it should never have been exported and
it's certain very few programs will depend on it: it's too weird.

Fixes #2846.

R=golang-dev, gri, bradfitz
CC=golang-dev
https://golang.org/cl/5639054
2012-02-08 14:09:20 +11:00
Rob Pike
bb7b1a11d5 bufio: drop error return for NewReaderSize and NewWriterSize
It complicates the interface unnecessarily.
Document this in go1.html.
Also update the go/doc Makefile.

Fixes #2836.

R=golang-dev, gri, bradfitz
CC=golang-dev
https://golang.org/cl/5642054
2012-02-08 13:07:13 +11:00
Nigel Tao
5e381d3a9a image: delete the image.Repeated type.
R=r
CC=golang-dev
https://golang.org/cl/5636045
2012-02-08 11:41:47 +11:00
Rob Pike
fc06cadd88 go_spec: primality is elusive
This time for sure.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5634046
2012-02-07 06:59:36 +11:00
Russ Cox
ae7497bda6 doc: remove overuse of simply
Specifically, remove simply where it is claiming that the
code or the action to be carried out is simple, since the
reader might disagree.

R=golang-dev, bradfitz, gri
CC=golang-dev
https://golang.org/cl/5637048
2012-02-06 13:34:35 -05:00
David Symonds
2943ca6b35 doc/go1.html: style tweak for expvar notes.
R=r
CC=golang-dev
https://golang.org/cl/5608061
2012-02-04 21:55:38 +11:00
David Symonds
715588f1d3 expvar: revise API.
Nuke RemoveAll from the public API.
Replace Iter functions with Do functions.

Fixes #2852.

R=rsc, r
CC=golang-dev
https://golang.org/cl/5622055
2012-02-04 14:32:05 +11:00
Christopher Wedgwood
6513e19532 spec: correct primes
R=r
CC=golang-dev
https://golang.org/cl/5627048
2012-02-04 10:34:31 +11:00
Rob Pike
2783691522 docs: replace references to gofix etc. with tool invocations
R=rsc
CC=golang-dev
https://golang.org/cl/5630045
2012-02-04 07:49:51 +11:00
Rob Pike
a044154a4c spec: restore primality
9 is prime if it's a hot day.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5630043
2012-02-04 06:16:02 +11:00
Russ Cox
c739dd2299 spec: 9 only looks prime
Fixes #2870.

R=golang-dev, agl, lvd
CC=golang-dev
https://golang.org/cl/5618050
2012-02-03 10:30:52 -05:00
David Symonds
b68d947b91 os/signal: move to exp/signal.
Fixes #2816.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5609048
2012-02-02 09:08:50 +11:00
Mikio Hara
2f63afdc7a net: ListenMulticastUDP to listen concurrently across multiple listeners
This CL introduces new function ListenMulticastUDP to fix
multicast UDP listening across multiple listeners issue,
to replace old multicast methods JoinGroup and LeaveGroup
on UDPConn.

This CL also enables multicast testing by default.

Fixes #2730.

R=rsc, paul.a.lalonde, fullung, devon.odell
CC=golang-dev
https://golang.org/cl/5562048
2012-02-01 01:53:26 +09:00
Nigel Tao
ceb1ca6b41 doc: add image/{bmp,tiff} renames to go1.tmpl.
R=r
CC=golang-dev
https://golang.org/cl/5598052
2012-01-31 12:29:00 +11:00
Andrew Gerrand
2ea25e240e doc: update weekly snapshot notes with subrepo changes
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5599051
2012-01-31 12:15:33 +11:00
Robert Griesemer
9c3d876db1 go/spec: Update language on map types.
Fixes #2803.

R=r
CC=golang-dev
https://golang.org/cl/5601053
2012-01-30 15:31:33 -08:00
Adam Langley
68aff958ae doc: update Go1 release notes in light of the crypto/hmac change.
R=r
CC=golang-dev
https://golang.org/cl/5532108
2012-01-27 10:12:27 -08:00
Andrew Gerrand
6786185fd6 weekly.2012-01-27
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5577060
2012-01-27 17:51:53 +11:00
Rob Pike
01afb79c59 FAQ: more words about why GOMAXPROCS>1 might not speed you up
R=golang-dev, adg, gri
CC=golang-dev
https://golang.org/cl/5572067
2012-01-26 14:44:38 -08:00
Robert Hencke
7c9ee5f369 doc/go1: minor html fixes
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5572064
2012-01-25 21:09:46 -08:00
Gustavo Niemeyer
7b5048570a doc/go1: add encoding/xml changes
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5569067
2012-01-26 00:59:50 -02:00
Gustavo Niemeyer
75e9d24213 doc/go1: fix urls
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5577051
2012-01-25 23:42:36 -02:00
Gustavo Niemeyer
805d620682 doc/go1: add net/url changes
R=golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/5575056
2012-01-25 23:11:25 -02:00
Robert Griesemer
d571c5ca78 go/doc: revert API change (per former discussion) and cleanup
Separating Method from Func made the code only more complicated
without adding much to the useability/readability of the API.
Reverted to where it was, but leaving the new method-specific
fields Orig and Level.

Former clients (godoc) of doc.Method only used the Func fields;
and because Func was embedded, no changes are needed with respect
to the removal of Method.

Changed type of Func.Recv from ast.Expr to string. This was a
long-standing TODO. Also implemented Func.Orig field (another TODO).

No further go/doc API changes are expected for Go 1.

R=rsc, r, r
CC=golang-dev
https://golang.org/cl/5577043
2012-01-25 16:48:06 -08:00
Rob Pike
7eaad5e640 go1: sub-repositories
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5569065
2012-01-25 13:29:25 -08:00
Rob Pike
dd442a556e doc/go1: mime, filepath.Walk
R=golang-dev, gri, bradfitz, adg
CC=golang-dev
https://golang.org/cl/5571060
2012-01-24 17:02:06 -08:00
Rob Pike
03ea8b1c81 doc/go1: add more info about hash and net changes, delete reference to html
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5570060
2012-01-24 16:36:40 -08:00
Rob Pike
2257e7670f doc/go1: image changes
R=nigeltao, christoph, rsc, r, tux21b
CC=golang-dev
https://golang.org/cl/5573048
2012-01-23 16:11:49 -08:00
Rob Pike
633a2ce096 spec: function invocation, panic on *nil
Document that indirection through a nil pointer will panic.
Explain function invocation.
This section will need more work, but it's a start.

Fixes #1865.
Fixes #2252.

R=rsc, iant, r
CC=golang-dev
https://golang.org/cl/5532114
2012-01-23 08:40:13 -08:00
Rob Pike
fcfed1479e FAQ: update to Go 1.
R=adg, rsc, r
CC=golang-dev
https://golang.org/cl/5562051
2012-01-23 08:39:53 -08:00
Olivier Duperray
9d47526585 doc/progs: Add the usual Copyright notice.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5568043
2012-01-23 11:19:48 +11:00
Olivier Duperray
2eb9733fce doc/codelab/wiki: Add the usual Copyright notice.
R=adg
CC=golang-dev
https://golang.org/cl/5554073
2012-01-23 09:28:32 +11:00
Rob Pike
531ded922f doc/go1: flag, runtime, testing
R=golang-dev, dsymonds, gri
CC=golang-dev
https://golang.org/cl/5557076
2012-01-20 15:38:03 -08:00
Stefan Nilsson
14d7e869eb doc: fix typo in Go for C++ programmers
R=iant
CC=golang-dev
https://golang.org/cl/5555062
2012-01-20 14:44:05 -08:00
Rob Pike
0a1376a1df doc/go1: rearrange a bit, sort the packages
This should make it easier to add the zillion little changes coming.
No content change here beyond a couple of introductory sentences.
Sections have been moved wholesale without editing them.

R=golang-dev, rsc, gri
CC=golang-dev
https://golang.org/cl/5557074
2012-01-20 14:28:48 -08:00
Robert Griesemer
6923f6d12a doc/go1.html: fix broken links
R=r
CC=golang-dev
https://golang.org/cl/5555060
2012-01-20 12:57:43 -08:00
Nigel Tao
22ef504654 weekly.2012-01-20
R=r
CC=golang-dev
https://golang.org/cl/5557067
2012-01-20 16:57:10 +11:00
Andrew Gerrand
8bbe5ccb71 godoc: support canonical Paths in HTML metadata
Redirect to the canonical path when the old path is accessed.

R=gri
CC=golang-dev
https://golang.org/cl/5536061
2012-01-20 07:37:36 +11:00
Adam Langley
a99e35b625 crypto/x509: remove explicit uses of rsa.
(Sending to r because of the API change.)

Over time we might want to add support for other key types.

While I was in the code, I also made the use of RawSubject the same
between Subject and Issuer when creating certificates.

R=r, rsc
CC=golang-dev
https://golang.org/cl/5554049
2012-01-19 08:49:52 -05:00
Adam Langley
247799ce8a crypto/elliptic: add constant-time P224.
(Sending to r because of the API change.)

This change alters the API for crypto/elliptic to permit different
implementations in the future. This will allow us to add faster,
constant-time implementations of the standard curves without any more
API changes.

As a demonstration, it also adds a constant-time implementation of
P224. Since it's only 32-bit, it's actually only about 40% the speed
of the generic code on a 64-bit system.

R=r, rsc
CC=golang-dev
https://golang.org/cl/5528088
2012-01-19 08:39:03 -05:00
Andrew Gerrand
3358a5068a godoc: add anchors to cmd documentation headings
Also, disable server-side generation of TOC for commands as they would
only ever show Overview. The JS does a better job (for now).

Fixes #2732.

R=gri, dsymonds
CC=golang-dev
https://golang.org/cl/5558046
2012-01-19 18:59:06 +11:00
Stefan Nilsson
1de4931113 doc/codewalk: update urlpoll to use time.Duration.
R=adg
CC=golang-dev
https://golang.org/cl/5545061
2012-01-19 14:45:59 +11:00
Andrew Gerrand
7cb21a79a4 godoc: specify HTML page metadata with a JSON blob
This allows HTML pages to specify arbitrary data in a header:

<!--{
        "Title": "The page title",
        ...
}-->

replacing the old style comments:

<!-- title The page title -->

R=gri, rsc, r, bradfitz, dsymonds
CC=golang-dev
https://golang.org/cl/5532093
2012-01-19 11:24:54 +11:00
Brad Fitzpatrick
b71883e9b0 net: change SetTimeout to SetDeadline
Previously, a timeout (in int64 nanoseconds) applied to a granularity
even smaller than one operation:  a 100 byte read with a 1 second timeout
could take 100 seconds, if the bytes all arrived on the network 1 second
apart.  This was confusing.

Rather than making the timeout granularity be per-Read/Write,
this CL makes callers set an absolute deadline (in time.Time)
after which operations will fail.  This makes it possible to
set deadlines at higher levels, without knowing exactly how
many read/write operations will happen in e.g. reading an HTTP
request.

Fixes #2723

R=r, rsc, dave
CC=golang-dev
https://golang.org/cl/5555048
2012-01-18 16:24:06 -08:00
Robert Griesemer
0203fbee64 doc/go1.*: documented changes to go/* package tree
R=r
CC=golang-dev
https://golang.org/cl/5557053
2012-01-18 14:35:23 -08:00
Russ Cox
1f1c9baf78 doc/go1.html: add notes about hash.Hash
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5536053
2012-01-18 10:36:43 -05:00
Rob Pike
7585aa6ae5 utf8.String: move to exp/utf8string.String
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5528115
2012-01-17 14:21:50 -08:00
Scott Lawrence
ddef49dfce doc/docs: fix broken links
R=golang-dev
CC=golang-dev
https://golang.org/cl/5539076
2012-01-17 10:29:08 -08:00
Jongmin Kim
343098edaa doc: I have modified the broken links.
R=golang-dev, duperray.olivier, r
CC=adg, golang-dev
https://golang.org/cl/5542054
2012-01-17 09:47:34 -08:00
David Symonds
e5ed3a53e1 doc: fix anchor tag for latest weekly.
R=golang-dev
TBR=adg
CC=golang-dev
https://golang.org/cl/5545068
2012-01-17 09:04:51 +11:00
Andrew Gerrand
a198707449 weekly.2012-01-15
R=golang-dev, dsymonds, r, n13m3y3r
CC=golang-dev
https://golang.org/cl/5543049
2012-01-16 09:45:20 +11:00
Rob Pike
5f7337769c spec: change the wording regarding select statement choice
s/pseudo-random fair/uniform pseudo-random/
This careful word choice soothes the theoretically inclined.

R=golang-dev, rsc, gri
CC=golang-dev
https://golang.org/cl/5528098
2012-01-13 13:38:36 -08:00
Brad Fitzpatrick
630c838886 build: don't use a fixed filename in temp
Fixes #2688

R=golang-dev, gri, rsc
CC=golang-dev
https://golang.org/cl/5539050
2012-01-12 14:45:32 -08:00
Dmitriy Vyukov
a03c519a8c effective_go: provide reference to runtime.NumCPU()
R=golang-dev, robert.hencke, r
CC=golang-dev
https://golang.org/cl/5538050
2012-01-12 22:06:50 +04:00
Shenghou Ma
cd54e44b50 doc: trivial comment typo fix
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5529080
2012-01-12 07:55:23 -08:00
Andrew Gerrand
d9b82baac1 doc: update "How to Write Go Code" to use the go tool
R=golang-dev, r, kevlar, rsc
CC=golang-dev
https://golang.org/cl/5534045
2012-01-12 08:25:49 +11:00
Robert Griesemer
1320ce00c4 spec: pointer comparison for pointers to 0-sized variables
- define "0-sized"
- add clarifying sentence to pointer comparison
- removed notion "location" which was used only in pointer comparisons
  and which was never defined

Fixes #2620.

R=r, rsc, iant
CC=golang-dev
https://golang.org/cl/5528053
2012-01-09 16:54:24 -08:00
Peter Mundy
834830d2bb doc: use 2012 for year in model standard copyright header
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5531048
2012-01-09 10:47:28 -08:00
Andrew Gerrand
468e692e38 doc: only trim newlines in tmpltohtml, gofmt progs
R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/5530048
2012-01-09 20:05:34 +11:00
Andrew Gerrand
7478bb981a doc: float -> float64 in Effective Go template
R=r, dsymonds
CC=golang-dev
https://golang.org/cl/5530047
2012-01-09 12:48:42 +11:00
Jeff R. Allen
b7f44e97a3 doc: float -> float64 in Effective Go
R=golang-dev
CC=golang-dev
https://golang.org/cl/5531046
2012-01-09 11:53:20 +11:00
Andrew Gerrand
9443949207 doc: add Slices: usage and internals article
Originally published on the Go blog on 5 Jan 2011:
http://blog.golang.org/2011/01/go-slices-usage-and-internals.html

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5516046
2012-01-06 09:21:43 +11:00
Andrew Gerrand
5353e1ef96 doc: trim spaces from code snippets
gofmt likes to put lines like
  // STOP OMIT
two blank lines from a closing brace, creating an ugly space inside
<pre> blocks in some of these files. This change resolves this issue.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5520044
2012-01-06 09:20:31 +11:00
Andrew Gerrand
8f1cb093ff doc/progs: test defer programs
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5517044
2012-01-05 16:43:02 +11:00
Paul Borman
dfedd34d4f doc: Fix URL to the Xcode web page
R=golang-dev, kevlar
CC=golang-dev
https://golang.org/cl/5504113
2012-01-04 11:31:51 +11:00
John DeNero
c2b87ce007 doc/codewalk/functions.xml: Fix broken function examples
I removed the broken function comparison example and fixed a code highlighting regexp.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5501078
2012-01-03 12:15:08 +11:00
Olivier Duperray
e4d624b04d doc/articles: add {{donotedit}} to templates
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5502088
2012-01-03 11:40:58 +11:00
Andrew Gerrand
1a06b513e7 weekly.2011-12-22
R=dsymonds, r, r, rsc, adg, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5498074
2011-12-23 14:28:01 +11:00
David Symonds
ddf67af01b doc: fix misspelt CSS properties.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5498071
2011-12-23 08:48:21 +11:00
Robert Hencke
019d78e548 doc: refer to http://build.golang.org/ where applicable
R=golang-dev, bradfitz, adg
CC=golang-dev
https://golang.org/cl/5501062
2011-12-22 14:21:25 +11:00
Rob Pike
ba9cb9dcf7 doc/progs/run: go1 prints output; fix test
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5502060
2011-12-21 12:06:20 -08:00
Rob Pike
a41006f35a effective_go: redeclaration
Fixes #2455.
Fixes #2013.

R=rsc, r, gri
CC=golang-dev
https://golang.org/cl/5498053
2011-12-20 14:15:35 -08:00
Rob Pike
c99f4f5bf6 doc: delete go course notes
They're out of date, a pain to maintain, and most of the material
is better served by the Go Tour.

Fixes #2101.

R=golang-dev, rsc, r, adg
CC=golang-dev
https://golang.org/cl/5489053
2011-12-19 13:23:27 -08:00
Andrew Gerrand
31cc66bc52 doc: suggest code.google.com/p/go instead of go.googlecode.com/hg
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5491069
2011-12-19 10:17:44 +11:00
Maxim Pimenov
bf6dd2db04 various: use $GCFLAGS and $GCIMPORTS like Make does
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5489065
2011-12-16 11:31:39 -05:00
Robert Griesemer
11b7c89b26 go spec: be precise about newlines
Several places mentioned tokens spanning "multiple lines"
which is not a well-defined term in the spec; newline is.

R=golang-dev, rsc, r
CC=golang-dev
https://golang.org/cl/5490046
2011-12-15 10:51:51 -08:00
Andrew Gerrand
c5fce33101 doc: remove an errant dot.
Curses!

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5489048
2011-12-15 17:17:39 +11:00
Andrew Gerrand
3388e9f67b weekly.2011-12-14
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5494045
2011-12-15 16:56:12 +11:00
Rob Pike
c26ca912e5 spec: skip carriage returns in raw literals
This change guarantees that whether the line ending convention
when the source is created includes carriage returns is irrelevant
to the value of the string. See issue 680.

The compilers do not yet implement this.

R=golang-dev, adg, r, gri, rsc, iant
CC=golang-dev
https://golang.org/cl/5491043
2011-12-14 21:52:41 -08:00
Robert Griesemer
599c18fa3f spec: values of underlying type uintptr can be converted to unsafe.Pointer
Not a language change, just stating the facts.

Fixes #1793.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5488071
2011-12-13 17:22:11 -08:00
Florian Weimer
b1175bebd0 contribute.html: do not fill in the reviewer field
The golang-dev mailing list is added automatically.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5482060
2011-12-13 17:45:01 -05:00
Rob Pike
5fa18e1061 doc/go1: time
R=rsc
CC=golang-dev
https://golang.org/cl/5477077
2011-12-12 21:08:03 -08:00
Rob Pike
f76bd4fe0f doc/go1: more package updates
Everything there (as first draft) except the time package.

R=golang-dev, adg, bradfitz
CC=golang-dev
https://golang.org/cl/5487052
2011-12-12 19:25:25 -08:00
Russ Cox
83f648c962 spec: allow comparison of structs, arrays containing comparable values
Also, clarify when interface comparison panics and
that comparison to nil is a special syntax rather than
a general comparison rule.

R=r, gri, r, iant, cw, bradfitz
CC=golang-dev
https://golang.org/cl/5440117
2011-12-12 22:21:46 -05:00
Andrew Gerrand
c400a0b7db doc: add Error Handling article
Originally published on The Go Programming Language Blog, July 12, 2011.

http://blog.golang.org/2011/07/error-handling-and-go.html

Update #2547

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5475060
2011-12-13 09:44:06 +11:00
Rob Pike
ebdcbf1cdc doc/go1: the simpler package changes
R=golang-dev, fullung, dsymonds, r, adg
CC=golang-dev
https://golang.org/cl/5477056
2011-12-12 12:26:56 -08:00
Andrew Gerrand
4068e3fc70 doc: remove file.go from run (fix windows build)
R=golang-dev, r, alex.brainman, r
CC=golang-dev
https://golang.org/cl/5479069
2011-12-12 16:14:38 +11:00
Rob Pike
b78a7b7dab doc/go_tutorial: make clear the file example is Unix-specific
Fixes #2553.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5472074
2011-12-11 21:03:49 -08:00
Andrew Gerrand
49d82b4ca1 doc: add Defer, Panic, and Recover article
Originally published on The Go Programming Language Blog, August 4 2010.

http://blog.golang.org/2010/08/defer-panic-and-recover.html

Update #2547

R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/5479053
2011-12-12 13:15:29 +11:00
Lucio De Re
90913cf170 Housekeeping: Cleaning up the clean-up process.
src/clean.bash:
        Add clean-ups for previously overlooked directories.
doc/codelab/wiki/Makefile:
        Dropped "index.html" from CLEANFILES so it will not be
        deleted on cleaning.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5476050
2011-12-11 09:23:17 -08:00
Robert Hencke
1084ab98b7 spec: adjust complex constant example
Fixes https://golang.org/cl/5444053/#msg41

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5478058
2011-12-10 10:04:33 -08:00
Rob Pike
71ccf73a74 doc/go1: syscalls, strconv
R=rsc
CC=golang-dev
https://golang.org/cl/5472054
2011-12-09 14:12:51 -08:00
Rob Pike
2e338fa69f doc/go1: the rest of the language changes
R=rsc
CC=golang-dev
https://golang.org/cl/5478047
2011-12-09 08:31:57 -08:00
Rob Pike
940c25faa4 tmpltohtml: feature for easier snippet extraction
Lines that end with OMIT are omitted from the output.
A comment such as
        // Example stops here. OMIT
can be used as a marker but not appear in the output.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5477050
2011-12-09 08:31:04 -08:00
Russ Cox
ef1c535727 spec: examples of untyped boolean, string constants
This is a spec correction, not a language change.
The implementations have behaved like this for years
(and there are tests to that effect), and elsewhere in
the spec true and false are defined to be untyped
boolean constants.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5477047
2011-12-09 00:13:19 -05:00
Russ Cox
6a47bb4974 spec: remove redundant, outdated definition of default literal types
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5480047
2011-12-09 00:12:49 -05:00
Russ Cox
d7f050a73e spec: rune is now an alias for int32
R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/5467048
2011-12-09 00:11:43 -05:00
Charles L. Dorian
9a358df947 spec: fix typo in example comment
R=rsc, golang-dev
CC=golang-dev
https://golang.org/cl/5475046
2011-12-08 22:27:14 -05:00
Russ Cox
a933635579 spec: var x = 'a' defaults to type rune
R=gri, r, r, adg, iant, ken
CC=golang-dev
https://golang.org/cl/5444053
2011-12-08 21:48:19 -05:00
Rob Pike
136c04f71a doc/go1: most of the simple language changes
R=rsc, adg, r
CC=golang-dev
https://golang.org/cl/5477044
2011-12-08 16:39:05 -08:00
Rob Pike
9d59c40eab doc/go1: document rearranged package hierarchy
Some exciting HTML and CSS here.

R=remyoudompheng, rsc, r
CC=golang-dev
https://golang.org/cl/5460047
2011-12-08 11:35:28 -08:00
Rob Pike
1ddedbae31 tmpltohtml: put a DO NOT EDIT mark automatically in the output
R=r, rsc, r
CC=golang-dev
https://golang.org/cl/5469045
2011-12-08 11:26:49 -08:00
Rob Pike
2fa987b6cd doc/go1: map deletion
This CL is in part a proposal for how to write these sections:
- Brief discussion of change
- No attempt to analyze the thinking about it
- Old code
- New code, runnable if possible
- How to update old programs

R=golang-dev, remyoudompheng, gri, adg
CC=golang-dev
https://golang.org/cl/5454044
2011-12-07 16:11:17 -08:00
Rob Pike
bab4dec142 doc: skeleton for release note document
No content yet other than titles and an introductory paragraph.
Once this is in, content can arise as separate manageable CLs.

R=rsc
CC=golang-dev
https://golang.org/cl/5435090
2011-12-07 14:33:37 -08:00
Andrew Gerrand
8d1da1c66a doc: fix weekly.2011-12-06 release notes typo
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5453072
2011-12-07 13:33:59 +11:00
Andrew Gerrand
0367eebb05 weekly.2011-12-06
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5453070
2011-12-07 13:15:10 +11:00
Russ Cox
2666b815a3 use new strconv API
All but 3 cases (in gcimporter.go and hixie.go)
are automatic conversions using gofix.

No attempt is made to use the new Append functions
even though there are definitely opportunities.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5447069
2011-12-05 15:48:46 -05:00
Russ Cox
98553f1422 spec: remove contentious composite literal shortening
R=gri, r, gustavo, r
CC=golang-dev
https://golang.org/cl/5451099
2011-12-05 14:22:23 -05:00
Russ Cox
5f49456465 spec: additional composite literal shortenings per Go 1 plan
R=golang-dev, gri, r, r
CC=golang-dev
https://golang.org/cl/5449067
2011-12-02 14:12:53 -05:00
Russ Cox
8a8445ba71 spec: pointer to array can be sliced
This has always been true, but we lost it from the spec
somewhere along the way, probably when we disallowed
the general 'pointer to anything sliceable' slice case.

R=gri
CC=golang-dev
https://golang.org/cl/5437121
2011-12-02 13:11:30 -05:00
Russ Cox
da5a251dde doc: do not slice array literal
The special case in the spec is that you can take the
address of a composite literal using the & operator.

A composite literal is not, however, generally addressable,
and the slice operator requires an addressable argument,
so [3]int{1,2,3}[:] is invalid.  This tutorial code and one bug
report are the only places in the tree where it appears.

R=r, gri
CC=golang-dev
https://golang.org/cl/5437120
2011-12-02 12:30:37 -05:00
Russ Cox
4dfe976d97 spec: avoid slice of array literal
R=gri
CC=golang-dev
https://golang.org/cl/5451078
2011-12-02 12:30:20 -05:00
Andrew Gerrand
517503dab8 doc: correct weekly snapshot notes on hash.Hash change
I had the wrong idea when I wrote this.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5437111
2011-12-02 13:36:21 +11:00
Andrew Gerrand
7af813a7f2 weekly.2011-12-02
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5447067
2011-12-02 08:09:49 +11:00
Volker Dobler
a6729b3085 go/doc: Detect headings in comments and format them as h3 in html.
To structure larger sections of comments in html output headings
are detected in comments and formated as h3 in the generated html.
A simple heuristic is used to detect headings in comments:
A heading is a non-blank, non-indented line preceded by a blank
line. It is followed by a blank and a non-blank, non-indented line.
A heading must start with an uppercase letter and end with a letter,
digit or a colon.  A heading may not contain punctuation characters.

R=jan.mercl, gri, adg, rsc, r
CC=golang-dev
https://golang.org/cl/5437056
2011-12-01 09:49:58 -08:00
Andrew Gerrand
9dd07f680a weekly.2011-12-01
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5448067
2011-12-01 16:17:24 +11:00
David Symonds
72a2979ef0 spec: update spacing to match gofmt, where reasonable.
R=gri, rsc
CC=golang-dev
https://golang.org/cl/5327053
2011-11-29 15:47:36 -08:00
Christopher Wedgwood
62203141ac doc/tmptohtml: output fix
R=r, gri
CC=golang-dev
https://golang.org/cl/5441047
2011-11-28 09:50:40 -08:00
Rob Pike
d1324d8a7a effective_go: remove unused variable from a couple of examples
Fixes #2481.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5435068
2011-11-24 08:51:47 -08:00
Rob Pike
f56db6f534 text/template: new, simpler API
The Set type is gone. Instead, templates are automatically associated by
being parsed together; nested definitions implicitly create associations.
Only associated templates can invoke one another.

This approach dramatically reduces the breadth of the construction API.

For now, html/template is deleted from src/pkg/Makefile, so this can
be checked in. Nothing in the tree depends on it. It will be updated next.

R=dsymonds, adg, rsc, r, gri, mikesamuel, nigeltao
CC=golang-dev
https://golang.org/cl/5415060
2011-11-23 20:17:22 -08:00
Rob Pike
422e247332 tutorial: update go_tutorial.html
There's version skew with respect to the programs in doc/progs.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5433048
2011-11-22 11:53:30 -08:00
Russ Cox
6e3e380923 allow direct conversion between string and named []byte, []rune
The allowed conversions before and after are:
        type Tstring string
        type Tbyte []byte
        type Trune []rune

        string <-> string  // ok
        string <-> []byte  // ok
        string <-> []rune // ok
        string <-> Tstring // ok
        string <-> Tbyte // was illegal, now ok
        string <-> Trune // was illegal, now ok

        Tstring <-> string  // ok
        Tstring <-> []byte  // ok
        Tstring <-> []rune // ok
        Tstring <-> Tstring // ok
        Tstring <-> Tbyte // was illegal, now ok
        Tstring <-> Trune // was illegal, now ok

Update spec, compiler, tests.  Use in a few packages.

We agreed on this a few months ago but never implemented it.

Fixes #1707.

R=golang-dev, gri, r
CC=golang-dev
https://golang.org/cl/5421057
2011-11-22 12:30:02 -05:00
Andrew Gerrand
3af28bd886 weekly.2011-11-18
R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/5416045
2011-11-19 07:20:02 +11:00
Russ Cox
ab957154b6 codereview: undo last night's rollback
Update version check from 1.4 to 1.9.  Suggest 2.0.

R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/5413046
2011-11-18 12:58:44 -05:00
Andrew Gerrand
0bbbb44e99 doc: link to Chinese translation of A Tour of Go
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5415046
2011-11-18 15:22:48 +11:00
Russ Cox
d03611f628 allow copy of struct containing unexported fields
An experiment: allow structs to be copied even if they
contain unexported fields.  This gives packages the
ability to return opaque values in their APIs, like reflect
does for reflect.Value but without the kludgy hacks reflect
resorts to.

In general, we trust programmers not to do silly things
like *x = *y on a package's struct pointers, just as we trust
programmers not to do unicode.Letter = unicode.Digit,
but packages that want a harder guarantee can introduce
an extra level of indirection, like in the changes to os.File
in this CL or by using an interface type.

All in one CL so that it can be rolled back more easily if
we decide this is a bad idea.

Originally discussed in March 2011.
https://groups.google.com/group/golang-dev/t/3f5d30938c7c45ef

R=golang-dev, adg, dvyukov, r, bradfitz, jan.mercl, gri
CC=golang-dev
https://golang.org/cl/5372095
2011-11-15 12:20:59 -05:00
Joel Sing
6687e52ab1 doc/install: add openbsd
Add openbsd to the $GOOS list.

R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/4964053
2011-11-14 07:52:36 -08:00
Alex Brainman
36494b0acd doc/progs: fix windows version to satisfy new error
R=rsc
CC=golang-dev
https://golang.org/cl/5376089
2011-11-14 20:53:03 +11:00
Russ Cox
efb74460c3 spec: disallow general func, map comparisons
R=golang-dev, gri, r, r
CC=golang-dev
https://golang.org/cl/5369090
2011-11-13 22:57:45 -05:00
Russ Cox
c017a8299f syscall: use error
- syscall (not os) now defines the Errno type.
- the low-level assembly functions Syscall, Syscall6, and so on
  return Errno, not uintptr
- syscall wrappers all return error, not uintptr.

R=golang-dev, mikioh.mikioh, r, alex.brainman
CC=golang-dev
https://golang.org/cl/5372080
2011-11-13 22:44:52 -05:00
Rob Pike
a50ee009f7 tutorial: describe unidirectional channels
R=golang-dev, adg, gri
CC=golang-dev
https://golang.org/cl/5370058
2011-11-10 14:02:14 -08:00
Rob Pike
bb66164542 effective_go: a little more about comma ok and type assertion
Fixes #2416.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5370049
2011-11-09 16:14:18 -08:00
Rob Pike
a9aef26a55 effective_go: fix up the description of cipher blocks and streams
R=golang-dev, r, agl, dsymonds
CC=golang-dev
https://golang.org/cl/5374046
2011-11-09 14:40:49 -08:00
Rob Pike
217408abf3 crypto: update incorrect references to Cipher interface; should be Block.
R=gri, rsc, r
CC=golang-dev
https://golang.org/cl/5372050
2011-11-09 14:22:44 -08:00
Rob Pike
f6615f1b5d FAQ: rearrange and expand the discussion of testing
R=gri, r, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/5369052
2011-11-09 13:19:23 -08:00
Russ Cox
98321731f2 doc: htmlescape weekly notes
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5370046
2011-11-09 13:52:02 -05:00
David Symonds
e5373c01f8 doc: fix anchor ID in weekly.html.
R=adg, rsc
CC=golang-dev
https://golang.org/cl/5359055
2011-11-09 15:43:21 +11:00
Rob Pike
8649444002 FAQ: update
R=bradfitz, r, dsymonds, edsrzf, rsc
CC=golang-dev
https://golang.org/cl/5345055
2011-11-08 16:26:03 -08:00
Andrew Gerrand
d83cc435e4 weekly.2011-11-09
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5344055
2011-11-09 10:57:09 +11:00
Rob Pike
f9489bed72 renaming_4: gofix -r everything/but/src/pkg
R=rsc
CC=golang-dev
https://golang.org/cl/5338043
2011-11-08 15:43:02 -08:00
Rob Pike
6ab6c49fce renaming_1: hand-edited files for go 1 renaming
This contains the files that required handiwork, mostly
Makefiles with updated TARGs, plus the two packages
with modified package names.
html/template/doc.go needs a separate edit pass.
test/fixedbugs/bug358.go is not legal go so gofix fails on it.

R=rsc
CC=golang-dev
https://golang.org/cl/5340050
2011-11-08 15:38:47 -08:00
Andrew Gerrand
4b39d115a0 weekly.2011-11-08
R=r
CC=golang-dev
https://golang.org/cl/5351049
2011-11-09 10:27:22 +11:00
Vincent Vanackere
eb1717e035 all: rename os.EOF to io.EOF in various non-code contexts
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5334050
2011-11-03 14:01:30 -07:00
Rob Pike
e223eedc8b spec: delete spurious article
A profound change to christen the new tag.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5327062
2011-11-01 20:57:17 -07:00
Andrew Gerrand
ede44c68a4 weekly.2011-11-02
R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/5308077
2011-11-02 12:00:13 +09:00
Russ Cox
492098eb75 all: rename os.Error to error in various non-code contexts
R=adg
CC=golang-dev
https://golang.org/cl/5328062
2011-11-01 22:58:09 -04:00
Russ Cox
44526cdbe0 non-pkg: gofix -r error -force=error
R=golang-dev, iant, r, r
CC=golang-dev
https://golang.org/cl/5307066
2011-11-01 22:06:05 -04:00
Rob Pike
68050ac76b tutorial,effective_go: prepare for error change
R=adg, rsc
CC=golang-dev
https://golang.org/cl/5316068
2011-11-01 21:50:21 -04:00
Russ Cox
d9877e22fe spec: add error
R=golang-dev, dsymonds, r, r
CC=golang-dev
https://golang.org/cl/5308072
2011-11-01 21:45:02 -04:00
Andrew Gerrand
08757f722c weekly.2011-11-01
R=rsc, r
CC=golang-dev
https://golang.org/cl/5336044
2011-11-02 10:37:01 +09:00
Rob Pike
cf7281e728 doc/Makefile: add 'all' rule to build all docs
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5334044
2011-11-01 09:45:04 -07:00
Andrew Gerrand
1fe22d2d24 doc: refer to tour.golang.org instead of go-tour.appspot.com
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5331055
2011-11-01 16:09:29 +09:00
Charles L. Dorian
44262d1574 doc: fix typo in spec example code comment
R=r, golang-dev, adg
CC=golang-dev
https://golang.org/cl/5308071
2011-11-01 15:13:33 +09:00
Robert Griesemer
b910a27396 go spec: introduce rune type
R=r, iant, rsc, r
CC=golang-dev
https://golang.org/cl/5293048
2011-11-01 01:09:22 -04:00
Andrew Gerrand
8a7b2b2f70 doc: A Tour of Go in Japanese
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5318058
2011-10-28 10:55:58 +09:00
Russ Cox
b7ef3c9a54 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
2011-10-27 12:22:45 -07:00
Andrew Gerrand
1e900b0d22 doc: fix escaping in weekly.html
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5306070
2011-10-27 15:40:57 +09:00
Andrew Gerrand
659f1f208a weekly.2011-10-26 (new rune type)
R=rsc
CC=golang-dev
https://golang.org/cl/5297062
2011-10-26 14:47:38 +09:00
Andrew Gerrand
cdd3d69328 weekly.2011-10-25
R=rsc
CC=golang-dev
https://golang.org/cl/5321053
2011-10-26 14:09:25 +09:00
Andrew Gerrand
ac21766c95 weekly.2011-10-18
R=rsc
CC=golang-dev
https://golang.org/cl/5302041
2011-10-19 11:31:57 +11:00
Russ Cox
cb2f6cb05d godoc: generate package toc in template, not in JavaScript
1. Generate TOC for package pages using template,
instead of using JavaScript magic.  This makes the
pages generated by godoc -html easier to export
to other systems.

2. Make TOC one column.  It's hard to do two columns
portably without invoking JavaScript.

3. Since the TOC is only one column, show full type
signatures for functions and methods.  Many times
that's all you need to see anyway.

4. Name the section after the TOC "Overview".
Naming it something is important, to set it off
from the TOC and so that there's a quick link to
it in the TOC.

For now, some illustrative examples:

http://swtch.com:6060/pkg/io/
http://swtch.com:6060/pkg/strings/
http://swtch.com:6060/pkg/tabwriter/
http://swtch.com:6060/pkg/unicode/

Fixes #1982.

R=gri, bradfitz, r
CC=golang-dev
https://golang.org/cl/5303044
2011-10-18 16:23:35 -04:00
Andrew Gerrand
6989b0db60 doc: document release.r60.3
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5267049
2011-10-18 10:43:22 +11:00
Russ Cox
e40d6e066a runtime: random offset for map iteration
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5285042
2011-10-17 18:49:02 -04:00
Robert Griesemer
c5a6b05ba4 go spec: clarifying variable declaractions w/ constants
Fixes #2377.

R=r, rsc
CC=golang-dev
https://golang.org/cl/5267048
2011-10-17 12:54:18 -07:00
Robert Griesemer
3e0c0a8add go spec: "delete" built-in function
R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/5272045
2011-10-17 12:53:10 -07:00
Andrew Gerrand
92b7b48213 doc: add go-tour-kr, a Korean translation of A Tour of Go
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5273043
2011-10-15 08:42:31 +11:00
Jaroslavas Počepko
ff866c4ca3 ld: Fixes issue 1899 ("cannot create 8.out.exe")
http://code.google.com/p/go/issues/detail?id=1899

R=rsc, alex.brainman, bsiegert, hectorchu, bradfitz
CC=golang-dev
https://golang.org/cl/4978047
2011-10-14 20:37:07 +01:00
Russ Cox
f58ed4e641 gc: disallow close on receive-only channels
Fixes #2353.
Fixes #2246.

R=golang-dev, r, gri
CC=golang-dev
https://golang.org/cl/5282042
2011-10-13 16:58:04 -04:00
Russ Cox
d1bafffa4b runtime: run goroutines during init
Fixes #583.
Fixes #1776.
Fixes #2001.
Fixes #2112.

R=golang-dev, bradfitz, r, gri
CC=golang-dev
https://golang.org/cl/5265044
2011-10-13 15:54:23 -04:00
Russ Cox
fa538114ed spec: define order of multiple assignment
R=golang-dev, r, gri
CC=golang-dev
https://golang.org/cl/5240055
2011-10-13 15:44:17 -04:00
Brad Fitzpatrick
145c18365e doc: minor homepage tweak
Don't imply that the tour isn't browser-based.

R=adg
CC=golang-dev
https://golang.org/cl/5265041
2011-10-13 09:03:24 -07:00
Dmitriy Vyukov
cd5f144fe2 doc: remove link to http://golanguage.ru/
I check it for several months and it always says
ERR_NAME_RESOLUTION_FAILED

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5272041
2011-10-13 10:09:43 +03:00
Luuk van Dijk
77fac21e82 runtime: append([]byte, string...)
Fixes #2274

R=rsc, gri, dsymonds, bradfitz, lvd
CC=golang-dev
https://golang.org/cl/5149045
2011-10-12 15:59:23 +02:00
Andrew Gerrand
cab53c899c doc: fix tutorial and Makefile PATH without dot
Fixes #2351.

R=r, bradfitz
CC=golang-dev
https://golang.org/cl/5235056
2011-10-10 11:16:04 +11:00
Andrew Gerrand
2b0d7f0836 weekly.2011-10-06
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5207044
2011-10-06 15:56:02 -07:00
Andrew Gerrand
edacc863d0 doc: remove errant console.log from godocs.js
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5211045
2011-10-06 13:12:11 -07:00
Andrew Gerrand
af1ae438b9 go/doc, godoc, gotest: support for reading example documentation
This CL introduces the go.Example type and go.Examples functions that
are used to represent and extract code samples from Go source.

They should be of the form:

// Output of this function.
func ExampleFoo() {
        fmt.Println("Output of this function.")
}

It also modifies godoc to read example code from _test.go files,
and include them in the HTML output with JavaScript-driven toggles.

It also implements testing of example functions with gotest.
The stdout/stderr is compared against the output comment on the
function.

This CL includes examples for the sort.Ints function and the
sort.SortInts type. After patching this CL in and re-building go/doc
and godoc, try
        godoc -http=localhost:6060
and visit http://localhost:6060/pkg/sort/

R=gri, r, rsc
CC=golang-dev
https://golang.org/cl/5137041
2011-10-06 11:56:17 -07:00
Rob Pike
029c9bcb8b Effective Go: IntArray -> IntSlice
Fixes #2336.

R=golang-dev, dsymonds, rsc
CC=golang-dev
https://golang.org/cl/5222042
2011-10-06 10:46:18 -07:00
Andrew Gerrand
a0b2d154e6 doc: document r60.2
R=rsc, dsymonds
CC=golang-dev
https://golang.org/cl/5204041
2011-10-05 13:59:39 -07:00
Andrew Gerrand
5d51b0ae53 doc: link to Czech translation of The Laws of Reflection
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5190045
2011-10-05 12:45:56 -07:00
Andrew Gerrand
f03b37b8df doc: link to A Tour of Go
R=golang-dev, rsc, r
CC=golang-dev
https://golang.org/cl/5181045
2011-10-05 11:12:07 -07:00
Luuk van Dijk
3e26862c1a documentation: Debugging Go code with GDB tutorial.
R=adg, cw, lvd
CC=golang-dev
https://golang.org/cl/5168046
2011-10-05 10:49:23 -07:00
Rob Pike
934c768019 doc: update tutorial.
Fix for new regexp library ($ isn't end of line any more).
Don't assume . is in PATH.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5175052
2011-10-03 16:18:47 -07:00
Nigel Tao
585294db73 doc: link to image/draw blog post.
R=adg
TBR=adg
CC=golang-dev
https://golang.org/cl/5154046
2011-09-30 13:11:20 +10:00
Ian Lance Taylor
807eb29f9f go spec: remove notes about gccgo limitations, now fixed
R=gri
CC=golang-dev
https://golang.org/cl/5164041
2011-09-29 14:50:55 -07:00
Russ Cox
44d13e3cfe doc: fix memory model read visibility bug
Fixes #2277.

R=dvyukov, r
CC=golang-dev
https://golang.org/cl/5083044
2011-09-26 12:54:30 -04:00
Andrew Gerrand
76d82dbc4c doc: link to image blog post
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5086048
2011-09-23 07:22:28 +10:00
Andrew Gerrand
e4ac43b7f0 weekly.2011-09-21
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5075050
2011-09-22 15:06:10 +10:00
Ian Lance Taylor
5d1d040e3a doc: when configuring gold for gccgo, use --enable-gold=default
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5030057
2011-09-19 11:54:07 -07:00
Andrew Gerrand
cecddc4dd3 doc: link to golang-france
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5059046
2011-09-19 15:36:06 +10:00
Andrew Gerrand
a66ae1d39e doc: update release.r60.1 notes
R=dsymonds
CC=golang-dev
https://golang.org/cl/5045045
2011-09-19 12:16:08 +10:00
Andrew Gerrand
b0e3edab0e weekly.2011-09-16
R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/5040042
2011-09-16 17:18:36 +10:00
Andrew Gerrand
f41ab6c7c8 doc: release.r60.1
R=r
CC=golang-dev
https://golang.org/cl/5002041
2011-09-15 19:26:12 +10:00
Andrew Gerrand
3bc2d0f20b doc: link to notable blog posts
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4996041
2011-09-10 09:35:25 +10:00
Andrew Gerrand
2544d30973 doc: release.r60
R=dsymonds, r, rsc
CC=golang-dev
https://golang.org/cl/4981047
2011-09-08 12:08:07 +10:00
Andrew Gerrand
ede613ac22 doc: fix date in weekly snapshot history
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4978057
2011-09-08 10:03:27 +10:00
Andrew Gerrand
c5c656aee3 weekly.2011-09-07
R=dsymonds, rsc, r
CC=golang-dev
https://golang.org/cl/4968070
2011-09-08 09:43:35 +10:00
David Symonds
e85fb2137b weekly.html: remove note about exp/template -> template move.
It actually occurred with the previous weekly snapshot.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4961066
2011-09-07 14:10:14 +10:00
Nigel Tao
ca64a37d9d weekly.2011-09-01
R=r, adg
CC=golang-dev
https://golang.org/cl/4975046
2011-09-01 17:08:53 +10:00
Robert Griesemer
ffe70eaa3c go spec: update section on Implementation Differences
R=rsc, r
CC=golang-dev
https://golang.org/cl/4977046
2011-08-31 15:16:51 -07:00
Jaroslavas Počepko
2afc46f2b2 doc/progs: fix windows/amd64
R=rsc
CC=alex.brainman, golang-dev, vcc.163
https://golang.org/cl/4965050
2011-08-29 15:38:12 -04:00
Russ Cox
0b12223fbe doc/codelab/wiki: fix Makefile
R=adg
CC=golang-dev
https://golang.org/cl/4971043
2011-08-29 09:24:24 -04:00
Russ Cox
dd0b8e7975 doc: emphasize that environment variables are optional
Also update $GOARM description.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4972041
2011-08-25 16:53:54 -04:00
Rob Pike
6731d47f99 effective go: fix erroneous quoting of ampersands that cropped up
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4937047
2011-08-23 13:54:29 +10:00
Robert Griesemer
d883f29309 godoc: add dummy playground.js to silence godoc warning at start-up
Fixes #2173.

R=r, rsc
CC=golang-dev
https://golang.org/cl/4941044
2011-08-22 14:06:07 -07:00
Rob Pike
18b21c720e effective go: extract and test a couple more examples.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4937045
2011-08-22 22:46:59 +10:00
Rob Pike
ebf2b92e9a effective_go: fix brace quotes.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4932044
2011-08-22 08:18:03 +10:00
Rob Pike
d1a3edaee7 effective_go: convert to use tmpltohtml.
Also update the big example to the new template system.
There are a number of other examples that should be
extracted; this CL serves as an introduction to the
approach.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4923043
2011-08-21 09:46:19 +10:00
Rob Pike
1446ffc265 doc/tmpltohtml: update to new template package.
Trivial change: just fix the import.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4937043
2011-08-21 09:04:21 +10:00
Andrew Gerrand
1491a20540 weekly.2011-08-17
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4914042
2011-08-18 14:27:08 +10:00
Andrew Gerrand
b67b72da43 doc/codelab: use new template package
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4897048
2011-08-18 10:38:08 +10:00
Andrew Gerrand
2a189845b6 doc/codewalk: new Markov chain codewalk
R=gri, r, rsc
CC=golang-dev
https://golang.org/cl/4891041
2011-08-17 15:53:17 +10:00
Rob Pike
73b7afbebd template: delete old template code.
It's already in old/template; make that build.
Update a couple of references to point to the old template.
They can be updated later.
Update goplay to use exp/template.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4902046
2011-08-17 14:34:48 +10:00
Rob Pike
ff0240da6d misc: fix a couple of template uses preparatory to the big switch.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4876057
2011-08-17 13:57:06 +10:00
Nigel Tao
da7e1ba00b weekly.2011-08-10
R=r
CC=golang-dev
https://golang.org/cl/4830069
2011-08-10 16:00:22 +10:00
Rob Pike
7d87f3d233 FAQ: variant types, unions
Fixes #1935.

R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/4850044
2011-08-06 11:21:59 +10:00
Rob Pike
93c4a246a4 FAQ: lots of small tweaks plus a couple of new discussions.
Expand the conversations about pointers, memory, and
garbage collection.
Describe the lack of co/contravariant typing.

Fixes #1929.
Fixes #1930.

R=dsymonds, r, mirtchovski, edsrzf, hanwen, rsc
CC=golang-dev
https://golang.org/cl/4852041
2011-08-06 07:41:55 +10:00
Andrew Gerrand
4d2766e994 doc: document release.r59
R=golang-dev, dsymonds, r, r
CC=golang-dev
https://golang.org/cl/4835044
2011-07-31 15:29:10 -07:00
Andrew Gerrand
70f6133b84 doc: fix typo in Effective Go
Fixes #2120.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4810061
2011-07-31 15:25:26 -07:00
David Symonds
be96fa5a2e go_faq: drop a dramatic comma.
R=r
CC=golang-dev
https://golang.org/cl/4809064
2011-07-31 12:59:58 +10:00
Andrew Gerrand
b583108436 weekly.2011-07-29
R=rsc
CC=golang-dev
https://golang.org/cl/4801062
2011-07-29 15:11:48 -07:00
Andrew Gerrand
50ddb98b24 weekly.2011-07-19
R=golang-dev, nigeltao, dsymonds, r
CC=golang-dev
https://golang.org/cl/4801042
2011-07-20 15:45:55 +10:00
Andrew Gerrand
894222f9de doc/talks/io2010: handle the errors
R=golang-dev, dsymonds, dsymonds, r
CC=golang-dev
https://golang.org/cl/4771041
2011-07-19 14:10:12 +10:00
Andrew Gerrand
ab55133ca9 doc: fix padding on h1 tags
See /doc/codewalk/sharemem/ for an example of how it's broken.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4742044
2011-07-18 17:30:00 +10:00
Robert Griesemer
38a53c7ecb go spec: (up-)date
R=rsc, bradfitz, r
CC=golang-dev
https://golang.org/cl/4738042
2011-07-14 15:58:37 -07:00
Russ Cox
58e19aa4cb go: require { } around else block
R=gri, ken, r
CC=golang-dev
https://golang.org/cl/4721044
2011-07-14 17:15:52 -04:00
Rob Pike
c1c8d46d20 go_tutorial: change the way it's generated.
No longer do we generate HTML from it; instead the input
file is already in HTML but has template invocations to
extract programs from other files.
Delete htmlgen, which is no longer needed.
Add tmpltohtml, which runs the templating code.

R=golang-dev, dsymonds, adg
CC=golang-dev
https://golang.org/cl/4699041
2011-07-13 13:20:05 +10:00
Andrew Gerrand
ba91dac3a9 doc: gofix io2010 demo programs
R=golang-dev, gri, r, agl
CC=golang-dev
https://golang.org/cl/4696046
2011-07-13 09:40:49 +10:00
Rob Pike
4c63129545 effective go: tweak the words about semicolons, parens in control structures,
and make and new.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4699043
2011-07-12 23:45:10 +10:00
Russ Cox
1002e82fff doc: document r58.1
R=adg, dsymonds
CC=golang-dev
https://golang.org/cl/4700041
2011-07-12 01:39:09 -04:00
Yasuhiro Matsumoto
34bac8bcd4 doc: don't specify make target for working on windwos.
makehtml does not work on windows.

R=golang-dev, adg, rsc
CC=golang-dev
https://golang.org/cl/4675041
2011-07-11 20:02:32 -04:00
Rob Pike
c17347eea9 tutorial: remove all line numbers and references to them.
R=golang-dev, mikioh.mikioh, dsymonds
CC=golang-dev
https://golang.org/cl/4675070
2011-07-09 23:17:38 +10:00
Mikio Hara
ab3365d34e doc/progs: gofmt -w
R=r, gri, r
CC=golang-dev
https://golang.org/cl/4662085
2011-07-09 20:16:45 +10:00
Andrew Gerrand
4f03ef7993 weekly.2011-07-07
R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/4668061
2011-07-08 13:13:38 +10:00
Brad Fitzpatrick
141f676bab doc: remove ed from apt-get package list
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4672052
2011-07-07 13:45:13 -07:00
Rob Pike
9cf37c3723 docs: fold the prog.sh scripting from makehtml into htmlgen itself.
This allows us to drop some crufty scripting and provides a firmer
footing for building better tools for preparing documents with source
code inside.

Also eliminate line numbers from the examples and text.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4650069
2011-07-04 16:15:14 +10:00
Wei Guangjing
63b8b948d9 windows: define and use syscall.Handle
Fixes #1487.

R=rsc, alex.brainman, go.peter.90, mikioh.mikioh, mattn.jp
CC=golang-dev
https://golang.org/cl/4600042
2011-07-01 10:18:07 -04:00
Andrew Gerrand
f81d81ca3f document release.r58
R=rsc, r, bsiegert
CC=golang-dev
https://golang.org/cl/4643058
2011-06-30 09:45:10 +10:00
Russ Cox
9dd354c63f 5l, 6l, 8l: drop use of ed during build
build runs with chmod 0 /bin/ed now

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4635071
2011-06-27 12:03:19 -04:00
Andrew Gerrand
30d08b404c weekly.2011-06-23
R=golang-dev, robert.hencke, r
CC=golang-dev
https://golang.org/cl/4625062
2011-06-24 16:04:17 +10:00
Ben Lynn
6be0bdf7bc Effective Go: supplied missing type in variadic function example.
R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/4595055
2011-06-21 10:55:07 +10:00
Rob Pike
5e77b9d334 doc/GoCourseDay1: shrink the PDF by rewriting it using ps2pdf.
No difference in content or appearance.
Forgot to do this when I updated this file a few days ago.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4626056
2011-06-20 12:36:14 +10:00
Andrew Gerrand
df02e65d54 doc/faq: remove misleading FAQ entry
R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/4638046
2011-06-19 13:53:07 +10:00
Andrew Gerrand
17805ddb6f doc/faq: add question about converting from []T to []interface{}
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4639046
2011-06-18 20:31:38 +10:00
Russ Cox
f4c7db0ed9 spec: disallow goto into blocks
R=gri, r, r
CC=golang-dev
https://golang.org/cl/4631045
2011-06-17 12:49:04 -04:00
Andrew Gerrand
d6b9dd8b81 weekly.2011-06-16
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4643044
2011-06-17 11:31:40 +10:00
Nigel Tao
ca91ce2d85 doc/effective_go: add a note about prefixing error strings with their
package name.

R=r, rsc
CC=golang-dev
https://golang.org/cl/4630042
2011-06-17 10:51:10 +10:00
Rob Pike
8db6802cec docs/GoCourseDay1.pdf: fix error in operator table.
Communications op was listed as a binary; it isn't any more.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4637041
2011-06-16 16:03:24 +10:00
Russ Cox
aaae15ef0f doc: document r57.2
R=adg, r
CC=golang-dev
https://golang.org/cl/4627042
2011-06-16 01:46:14 -04:00
Rob Pike
e3d2a29e99 doc/effective_go.html: replace tab with spaces.
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4609042
2011-06-16 00:13:18 +10:00
Rob Pike
c6c8dbd646 doc/gopher: add a small gif to use as an app engine logo on GAE pages.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4591078
2011-06-14 17:25:57 +10:00
Rob Pike
6d42af7197 doc/gopher: add jpgs of the goggled gopher logo for App Engine.
R=golang-dev, r, adg
CC=golang-dev
https://golang.org/cl/4591077
2011-06-14 16:42:52 +10:00
Robert Griesemer
2769356dda go spec: specify constant conversions
This is not a language change.

Added paragraphs specifying which conversions
yield results that are constants.

R=r, rsc, iant, ken
CC=golang-dev
https://golang.org/cl/4515176
2011-06-13 16:47:33 -07:00
Robert Griesemer
eee70b07c1 go spec: unsafe.Alignof/Offsetof/Sizeof return uintptr
This is (indirectly) a language change. Per e-mail discussion
on golang-dev.

Fixes #1943.

R=rsc, iant, r, ken
CC=golang-dev
https://golang.org/cl/4581058
2011-06-13 16:46:42 -07:00
Robert Griesemer
95b8137a16 go spec: clarify rules for append, scope rules for :=
Fixes #1936.
Fixes #1940.

R=rsc, r, iant, ken, iant
CC=golang-dev
https://golang.org/cl/4585049
2011-06-12 12:09:50 -07:00
Rob Pike
4b1170d2b1 sort: change IntArray etc. to IntSlice for better name hygiene.
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4602054
2011-06-11 09:25:18 +10:00
Robert Griesemer
18333f2de5 Go memory model: minor clarification
Fixes #1941.

R=rsc
CC=golang-dev
https://golang.org/cl/4576053
2011-06-10 12:31:10 -07:00
Rob Pike
9b409ac7ee docs: Update notes for 3-day Go course.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4605041
2011-06-10 15:05:51 +10:00
Andrew Gerrand
11b04261c7 weekly.2011-06-09
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4601052
2011-06-10 14:26:09 +10:00
Robert Griesemer
636c5fac2d go spec: handle a corner case of a special case for shifts...
- Added some additional examples.
- 6g appears to implement this semantics already.

Fixes #658.

R=rsc, r, iant, ken
CC=golang-dev
https://golang.org/cl/4538119
2011-06-08 09:11:18 -07:00
Andrew Gerrand
79eded509c doc: don't insert paragraphs inside pre blocks
doc: update go_tutorial

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4568056
2011-06-06 13:33:05 +10:00
Andrew Gerrand
897ad0c05e weekly.2011-06-02
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4548091
2011-06-03 11:18:34 +10:00
Andrew Gerrand
6c2b434820 doc: add Belarusian FAQ translation
R=golang-dev, dchest
CC=golang-dev
https://golang.org/cl/4564057
2011-06-03 09:48:42 +10:00
Andrew Gerrand
119a341c38 doc: add link to App Engine docs to front page
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4539100
2011-06-02 11:00:24 +10:00
Andrew Gerrand
2386808ee9 doc: put Release History link on 'Documentation' page
Also put Weekly Snapshot History link on 'Contributing' page

Fixes #1885.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4559049
2011-05-27 16:07:30 +10:00
Andrew Gerrand
feb9a146f9 doc: mention go/printer instead of container/vector in effective go
Fixes #1876.

R=golang-dev, bradfitz, gri, r
CC=golang-dev
https://golang.org/cl/4538093
2011-05-25 11:39:40 +10:00
Rob Pike
2f655c4bb7 spec: delete spurious tag.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4536082
2011-05-25 10:58:58 +10:00
Robert Griesemer
3c7271f057 go spec: be precise with the use of the informal ellipsis … and the Go token ...
Fixes #1867.

R=r
CC=golang-dev
https://golang.org/cl/4538092
2011-05-24 14:18:44 -07:00
Rob Pike
46f482a2fc docs: remove some prose-unworthy empty parentheses.
In our evolving style, prose should name a function "f" not "f()".

R=gri, rsc
CC=golang-dev
https://golang.org/cl/4550075
2011-05-25 06:44:09 +10:00
Rob Pike
bdbe0decc6 spec: add missing comma.
A real humdinger.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4538089
2011-05-25 06:00:07 +10:00
Robert Griesemer
32d127823f go spec: clarify rules for shifts
Note: This is not a spec change.

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

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

Fixes #1708.

R=rsc, r, iant, r
CC=golang-dev
https://golang.org/cl/4517074
2011-05-23 14:12:42 -07:00
Andrew Gerrand
f6742e7482 weekly.2011-05-22
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4523090
2011-05-23 16:30:06 +10:00
Evan Shaw
64d85769da doc: close paragraph tags in FAQ
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4532076
2011-05-22 14:56:12 +10:00
Andrew Gerrand
b9f9087605 godoc: don't display navigation list with only 1 element
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4547056
2011-05-20 14:26:00 +10:00
Andrew Gerrand
b96fc594ba doc: add Korean Go site
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4515092
2011-05-17 14:24:32 +10:00
Andrew Gerrand
4fb5857596 doc: add I/O 2011 talks to talks/, docs.html, and front page.
R=rsc
CC=golang-dev
https://golang.org/cl/4516057
2011-05-17 13:46:54 +10:00
Russ Cox
9f03d4a3f7 doc/go_mem.html: close happens before receive on closed channel
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4551042
2011-05-16 17:03:51 -04:00
Nigel Tao
703b092779 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
2011-05-15 16:04:37 -07:00
Rob Pike
9ada841f4d 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
2011-05-13 16:25:31 -07:00
Robert Griesemer
32b822f29a 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
2011-05-13 12:54:51 -07:00
Brad Fitzpatrick
e113e405de doc: auto-generated html change missing from 7ee7980ea06d
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4515077
2011-05-13 08:12:34 -07:00
Brad Fitzpatrick
05a1b7ec41 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
2011-05-13 07:31:24 -07:00
Robert Griesemer
5473103666 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
2011-05-12 09:15:59 -07:00
Johan Euphrosine
5f6e1cfca7 doc/codelab: correct typo.
s/Sprintf/Fprintf/

R=golang-dev, rsc
CC=adg, golang-dev
https://golang.org/cl/4519053
2011-05-12 11:21:10 -04:00
Rob Pike
89c59bc6f6 effective go: explain about values/pointers in String() example
Fixes #1796.

R=rsc, r2, niemeyer
CC=golang-dev
https://golang.org/cl/4539049
2011-05-11 08:31:24 -07:00
Andrew Gerrand
a03bfe7f69 doc/roadmap: put "App Engine support" under "Done".
R=rsc, dsymonds
CC=golang-dev
https://golang.org/cl/4528053
2011-05-10 18:40:40 -07:00
Rob Pike
38d7bcf5e2 go spec: fix up HTML glitches.
Fixes #1786.

R=gri, adg
CC=golang-dev
https://golang.org/cl/4517043
2011-05-08 14:05:18 -07:00
Rob Pike
121b428a7a effective go: update to new Open signature.
Fixes #1788.

R=rsc, adg
CC=golang-dev
https://golang.org/cl/4519042
2011-05-08 14:04:42 -07:00
Dmitry Chestnykh
be99859dbe doc: remove left and right padding in H2 headings.
R=adg, rsc1, rsc
CC=golang-dev
https://golang.org/cl/4491041
2011-05-06 16:11:07 -04:00
Robert Griesemer
0e8032ca49 go spec: newlines cannot be used inside a char or "" string literal
R=r
CC=golang-dev
https://golang.org/cl/4462043
2011-05-05 09:03:00 -07:00
Russ Cox
f0bcb6dd24 doc: document r57.1
R=adg
CC=golang-dev
https://golang.org/cl/4471041
2011-05-04 00:14:07 -04:00
Russ Cox
d6dd80b65e doc: release.r57
R=golang-dev, r, adg, r2
CC=golang-dev
https://golang.org/cl/4457049
2011-05-03 13:55:50 -04:00
Andrew Gerrand
a3baf7f90e doc/install: specify clone -u instead of -r
R=rsc
CC=golang-dev
https://golang.org/cl/4435081
2011-05-02 20:40:47 -07:00
Robert Griesemer
8e340695c1 godoc: if there is no search box, don't run the respective JS code
Fixes a JS crash which prevented the automatically generated
table of contents to not appear.

R=adg, bradfitz
CC=golang-dev
https://golang.org/cl/4460041
2011-05-02 18:07:11 -07:00
Robert Griesemer
bb7eb4002e go spec: clarify semantics of integer division
Fixes #1764.

R=rsc, r, iant, ken2
CC=golang-dev
https://golang.org/cl/4431082
2011-05-02 17:23:18 -07:00
Robert Griesemer
6af887ec03 go spec: restricted expressions may still be parenthesized
No language change.

- added a few examples with parentheses
- added a corresponding sentence to assignments
  (this explicitly permits: (_) = 0, currently allowed by 6g,
  gofmt, but marked as an error by gccgo).

R=rsc, r, iant
CC=golang-dev
https://golang.org/cl/4446071
2011-05-02 09:16:31 -07:00
Robert Griesemer
c134718611 undo CL 4428057 / 19e540fc7d7d
The CL introduces inconsistencies with respect to
the use of parentheses/grouping of receive operations.

««« original CL description
spec: narrow syntax for expression and select statements

This is not a language change, it simply expresses the
accepted cases explicitly in the respective productions.

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

R=golang-dev, rsc1
CC=golang-dev
https://golang.org/cl/4444080
2011-04-29 12:20:31 -07:00
Robert Griesemer
95f544a199 spec: narrow syntax for expression and select statements
This is not a language change, it simply expresses the
accepted cases explicitly in the respective productions.

R=rsc, r, iant
CC=golang-dev
https://golang.org/cl/4428057
2011-04-29 09:49:10 -07:00
Andrew Gerrand
5a8ae387e2 weekly.2011-04-27
R=rsc
CC=golang-dev
https://golang.org/cl/4437077
2011-04-28 16:32:51 +10:00
Rob Pike
2ccd20a646 tutorial: replace the forever loops with finite counts in sieve programs.
Fixes #1742.
I hope.

Also this picks up an update to go_tutorial.html that should already have happened.

R=brainman, rsc, peterGo
CC=golang-dev
https://golang.org/cl/4452050
2011-04-27 09:59:27 -07:00
Russ Cox
c3e6e6ec09 doc: mention make version in install.html
Fixes #1531.

R=adg
CC=golang-dev
https://golang.org/cl/4442088
2011-04-26 21:39:22 -04:00
Robert Griesemer
1bdb1803b9 go spec: for map types, mention indexing operations
(like we do for arrays and slices).

Suggested by mathieu.lonjaret@gmail.com .

R=r, rsc, iant
CC=golang-dev
https://golang.org/cl/4442074
2011-04-22 16:26:51 -07:00
Nigel Tao
6a186d38d1 src/pkg: make package doc comments consistently start with "Package foo".
R=rsc
CC=golang-dev
https://golang.org/cl/4442064
2011-04-20 09:57:05 +10:00
Robert Griesemer
0f7acf1114 go spec: attempt at clarifying language for "append"
Specifically, fix a wrong comment.

Fixes #1717.

R=r, rsc
CC=golang-dev
https://golang.org/cl/4445050
2011-04-19 14:38:49 -07:00
Rob Pike
23fc9c84bd tutorial: modernize the definition and use of Open.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/4446053
2011-04-18 10:51:40 -07:00
Dmitry Chestnykh
84c7e83b4c godoc: use "search" input type for search box.
Uses placeholder attribute instead of changing the value of search
field on browsers that support it.  On other browsers, the fake
placeholder text is restored when the empty box loses focus.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4441041
2011-04-15 10:48:45 -07:00
Andrew Gerrand
0f03eedb87 weekly.2011-04-13
R=dsymonds
CC=golang-dev
https://golang.org/cl/4396047
2011-04-14 14:18:35 +10:00
Andrew Gerrand
eb5e4b8519 doc/install.html: document use of libc6-dev-i386
Fixes #1689.

R=rsc
CC=golang-dev
https://golang.org/cl/4404043
2011-04-14 10:28:59 +10:00
John DeNero
4ffee801ce A codewalk through a simple program that illustrates several aspects of Go functions: function objects, higher-order functions, variadic functions, tail recursion, etc. The example program simulates the game of Pig, a dice game with simple rules but a nontrivial solution.
R=adg, rsc, iant2, r
CC=golang-dev
https://golang.org/cl/4306045
2011-04-07 18:05:15 -07:00
Rob Pike
108ba69ae3 roadmap: add sections on tools, packages.
R=golang-dev, rsc1, r2, bradfitzgo, gri
CC=golang-dev
https://golang.org/cl/4344068
2011-04-05 13:25:58 -07:00
Rob Pike
e6b1d424c4 spec: add parens missing from "protect" example.
Fixes #1665.

R=gri
CC=golang-dev
https://golang.org/cl/4351051
2011-04-05 11:01:25 -07:00
Andrew Gerrand
51319b1125 weekly.2011-04-04
R=rsc
CC=golang-dev
https://golang.org/cl/4363043
2011-04-05 12:55:03 +10:00
Rob Pike
016a99f440 roadmap: remove description of implementation of garbage collector.
It was speculation.
Also replace one silly word with an English replacement.

R=golang-dev, bradfitzgo
CC=golang-dev
https://golang.org/cl/4339041
2011-03-31 13:13:04 -07:00
Andrew Gerrand
33e41802f9 weekly.2011-03-28
R=r, rsc
CC=golang-dev
https://golang.org/cl/4272072
2011-03-29 14:17:04 +11:00
Ian Lance Taylor
d38d66e646 doc: gccgo now supports method expressions and multiple init functions.
R=gri
CC=golang-dev
https://golang.org/cl/4314047
2011-03-28 14:48:35 -07:00
Russ Cox
6b3357129a build: add all-qemu.bash, handful of arm fixes
R=r
CC=golang-dev
https://golang.org/cl/4313051
2011-03-27 23:39:42 -04:00
Andrew Gerrand
eccf31b744 doc: update contrib.html to be more enticing
doc: refer to golang-dev instead of -nuts in contribute.html

R=r, rsc
CC=golang-dev
https://golang.org/cl/4309043
2011-03-24 11:06:02 +11:00
Andrew Gerrand
393ea2dfa8 doc: mention godoc in "implements" FAQ
R=r
CC=golang-dev
https://golang.org/cl/4248066
2011-03-17 16:37:34 +11:00
Andrew Gerrand
929449ddaf doc: explain release and weekly tags in install.html
R=r
CC=golang-dev
https://golang.org/cl/4272058
2011-03-17 16:33:10 +11:00
Andrew Gerrand
e44c057369 doc: fix line wrapping for release.html
R=r
CC=golang-dev
https://golang.org/cl/4281052
2011-03-16 16:36:18 +11:00
Andrew Gerrand
f538f2432e weekly.2011-03-15
R=r
CC=golang-dev
https://golang.org/cl/4272052
2011-03-16 16:24:08 +11:00
Russ Cox
108564dabc spec: disallow unused labels
Also change labelled examples to use gofmt formatting.

R=gri, r, jnml
CC=golang-dev
https://golang.org/cl/4287046
2011-03-15 13:51:24 -04:00
Russ Cox
9f2cb86fe2 spec: remove closed from language, replaced by x, ok = <-c
R=gri, r, r2
CC=golang-dev
https://golang.org/cl/4249065
2011-03-11 14:47:02 -05:00
Andrew Gerrand
08ceb870f2 .hgtags: s/release/weekly/
.hgtags, release.html: tag current weekly as release.r56

R=r, rsc
CC=golang-dev
https://golang.org/cl/4281041
2011-03-11 18:04:18 +11:00
Rob Pike
9e2fbe186d Effective Go: some small cleanups.
Add discussion of getters.
Add example using a map as a set.

R=golang-dev, gri, adg, iant
CC=golang-dev
https://golang.org/cl/4240100
2011-03-09 16:47:40 -08:00
Andrew Gerrand
4896b17584 doc: update codelab wiki to fix template.Execute argument order
Fixes #1595.

R=r
CC=golang-dev
https://golang.org/cl/4243067
2011-03-09 12:59:13 +11:00
Rob Pike
ce0de4229f FAQ: hello, world is now 1.1MB, down from 1.8MB
R=rsc
CC=golang-dev
https://golang.org/cl/4235061
2011-03-08 11:47:41 -08:00
Robert Griesemer
fb64e0d96f go spec: clarify return statement rules
Added example of a return statement w/o expressions
in a function with a _ result parameter.

See also: http://code.google.com/p/go/issues/detail?id=1586

R=rsc, r, iant
CC=golang-dev
https://golang.org/cl/4266049
2011-03-07 16:29:07 -08:00
Alex Brainman
2ae4f356cc doc/codelab/wiki: include into windows build
R=adg, rsc
CC=Joe Poirier, golang-dev
https://golang.org/cl/4257052
2011-03-07 15:48:39 +11:00
Andrew Gerrand
7fb65a936b doc: amend release.2011-03-07 notes to mention reflect and path changes
R=rsc
CC=golang-dev
https://golang.org/cl/4250061
2011-03-07 14:46:55 +11:00
Andrew Gerrand
c1d44c9453 release.2011-03-07
R=r, rsc, dfc
CC=golang-dev
https://golang.org/cl/4240081
2011-03-07 13:55:22 +11:00
Andrew Gerrand
89f890f266 doc: there's no such thing as a .cgo file
R=rsc
CC=golang-dev
https://golang.org/cl/4264043
2011-03-04 16:28:27 +11:00
Andrew Gerrand
aef4e1c349 doc: add "implements" question to FAQ
R=r, fw, gri, r2, yiyus
CC=golang-dev
https://golang.org/cl/4248051
2011-03-04 13:11:07 +11:00
Andrew Gerrand
ee1cb829ac doc: describe platform-specific conventions in code.html
R=r, rsc, gri
CC=golang-dev
https://golang.org/cl/4257049
2011-03-04 12:28:08 +11:00
Robert Griesemer
967a2b38cd go spec: minor clarification of scope rule for functions
R=rsc, iant, r, r2
CC=golang-dev
https://golang.org/cl/4256050
2011-03-03 15:24:28 -08:00
Andrew Gerrand
3fea5badc2 doc: remove reference to bug count from install.html
Fixes #1574.

R=rsc, r2
CC=golang-dev
https://golang.org/cl/4240066
2011-03-03 16:41:03 +11:00
Rob Pike
966bf71366 docs: make "runtime" a word only as a name for the package.
Computer people have an agglutinating streak that I like to resist.
As a time of execution: run time.
As an adjective: run-time.
As a noun: run-time support/code/library.

Signed,
Mr. Pedant.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4252048
2011-03-01 13:54:22 -08:00
Andrew Gerrand
4b0ecd3f49 doc: add FAQ about large binaries and stack vs heap allocation
doc: add internationalization to roadmap

R=rsc, r, r2
CC=golang-dev
https://golang.org/cl/4251047
2011-03-01 21:35:46 +11:00
Andrew Gerrand
625bcf9f16 release.2011-02-24
R=r, rsc
CC=golang-dev
https://golang.org/cl/4213044
2011-02-25 14:13:14 +11:00
Kyle Consalus
07cc8b9ad2 Make.pkg, doc: Replace references to "-benchmarks" and "-match" with "-test.bench" and "-test.run".
R=r
CC=golang-dev
https://golang.org/cl/4197041
2011-02-22 20:23:21 -08:00
Robert Griesemer
a1368a6ad0 go spec: make condition mandatory in if statements
Plus a few minor HTML fixes.

Fixes #1535.

R=r, rsc, ken2, iant, r2
CC=golang-dev
https://golang.org/cl/4185065
2011-02-22 15:31:57 -08:00
Robert Griesemer
556506e869 go spec: fix local link
Fixes #1543.

R=rsc, r2
CC=golang-dev
https://golang.org/cl/4169068
2011-02-22 09:34:13 -08:00
Rob Pike
e041b9980c spec: delete incorrect obsolete mention of selector working on
pointer to interface type.

R=golang-dev, niemeyer, gri
CC=golang-dev
https://golang.org/cl/4173067
2011-02-19 15:04:56 -08:00
Rob Pike
6095ff3864 Effective Go: stress that comments are uninterpreted text
that should look in godoc.

R=rsc, dsymonds
CC=golang-dev
https://golang.org/cl/4192041
2011-02-16 22:35:31 -08:00
Andrew Gerrand
6ccc96eea9 doc/devel/release: discuss StartProcess in release notes
R=rsc
CC=golang-dev
https://golang.org/cl/4172051
2011-02-16 21:20:50 -05:00
Andrew Gerrand
cf994def95 doc: fix release notes anchor tag
R=r, r2
CC=golang-dev
https://golang.org/cl/4178055
2011-02-16 09:41:34 +11:00
Robert Griesemer
f14c29a311 go spec: minor clarification on channel types
No language change.

R=r, rsc, iant, ken2, r2
CC=golang-dev
https://golang.org/cl/4168050
2011-02-15 11:33:12 -08:00
Andrew Gerrand
d8ba9a440c release.2011-02-15
R=rsc
CC=golang-dev
https://golang.org/cl/4191041
2011-02-16 02:58:08 +11:00
Rob Pike
29ae8e9a98 makehtml: use append
The program is old and missed its opportunity.

R=gri, adg
CC=golang-dev
https://golang.org/cl/4178050
2011-02-14 11:47:19 -08:00
Rob Pike
7115eef6be tutorial: rework the introduction to give "Effective Go"
prominence and downplay the course notes.

R=golang-dev, gri, rsc
CC=golang-dev
https://golang.org/cl/4190041
2011-02-14 11:25:00 -08:00
Russ Cox
b9f94768f9 build: run test/ directory first
R=adg, r
CC=golang-dev
https://golang.org/cl/4183047
2011-02-14 09:27:02 -05:00
Rob Pike
bab5536af6 code.html: update to reflect that package names need not be unique
Fixes #1507.

R=golang-dev, ehog.hedge, rsc
CC=golang-dev
https://golang.org/cl/4160049
2011-02-12 18:03:16 -08:00
Rob Pike
fb9e37cd9b template: reverse order of arguments to Execute
In line with other functions such as Fprintf, put the
thing to be written first.

Apologies for the breakages this is sure to cause.

R=rsc, gri, adg, eds, r2, aam
CC=golang-dev
https://golang.org/cl/4169042
2011-02-09 14:23:01 -08:00
Robert Griesemer
2a81292ac3 srcextract: HTML-escape output if so desired
This functionality was removed with CL 4169041.

Minor simplifications.

R=r, adg
CC=golang-dev
https://golang.org/cl/4171042
2011-02-09 14:08:19 -08:00
Rob Pike
6d51fc6c1e codelab: update due to recent changes in go/printer
R=gri, adg
CC=golang-dev
https://golang.org/cl/4169041
2011-02-09 12:46:34 -08:00
Anthony Martin
0122a667b6 go spec: fix a few typos
The spec can now be parsed with an
xml.Parser using the HTML settings.

R=gri
CC=golang-dev
https://golang.org/cl/4155042
2011-02-08 14:51:15 -08:00
Robert Griesemer
2a838d6424 go spec: clarification re: method sets of newly declared pointer types
- added an example to Type declarations section clarifying the
  situation brought up with issue 1324
- slightly re-ordered paragraphs in Types section
- added separate heading for method set section and refer to it
  from elsewhere in the spec
- no language changes

R=rsc, r, iant, ken2, r2
CC=golang-dev
https://golang.org/cl/4145043
2011-02-08 13:31:01 -08:00
Andrey Mirtchovski
b2b29814bf Codelab/wiki: fix typo
Missing closing bracket renders the next code snippet unreadable.

R=adg, gri
CC=golang-dev
https://golang.org/cl/4119060
2011-02-07 11:51:17 -08:00
Andrey Mirtchovski
61c93cac3e Codelab: correct function definitions for handlers before closures are introduced.
A couple of post-closure function definitions were introduced too early, making the resulting
code fail compilation.

Also, the TitleValidator regexp was missing.

R=adg
CC=golang-dev
https://golang.org/cl/4105054
2011-02-07 09:23:18 +01:00
Gustavo Niemeyer
f8404ee3e1 spec: fix Typeof() return type
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4121058
2011-02-04 09:29:08 -08:00
Robert Griesemer
76f3228520 go spec, effective go: cleanups
Removed most of the detailed examples about handing panics
from the go spec since it's now covered by Effective Go.

R=r, rsc, iant, ken2
CC=golang-dev
https://golang.org/cl/4128058
2011-02-04 08:43:21 -08:00
Robert Griesemer
838b5ad9d6 go spec: move to Unicode 6.0
R=r, r2
CC=golang-dev
https://golang.org/cl/4128055
2011-02-03 12:27:41 -08:00
Robert Griesemer
fa3d0d73f0 go spec: adjust notion of Assignability
This change makes it legal to pass a struct value as receiver
outside the package declaring the struct even if the respective
struct type has non-exported fields.

This is a backwards-compatible language change motivated by the
fact that it is already possible to circumvent the assignment
restriction when calling methods through interfaces (see issue
1402).

R=r, rsc, iant, ken2
CC=golang-dev
https://golang.org/cl/3926044
2011-02-03 10:53:31 -08:00
Russ Cox
a6736cae30 spec: allow imported packages named main
Prior to this CL, there were two requirements about the
package name main.

1. The package that sits at the root of the import graph
   (the one where program execution begins)
   must be named main.

2. No other package in the program can be named main.

This CL only removes requirement #2, which can be done
without changing any other Go documentation.

The new wording and formatting is such that removing
requirement #1 can be done by deleting a single line,
but making that change is explicitly outside the scope
of this CL, because it would require changes to other
documentation at the same time.

R=gri, r, gri1
CC=golang-dev
https://golang.org/cl/4126053
2011-02-03 13:40:51 -05:00
Robert Griesemer
68b40fbbb8 Getting Started guide: update for new versions of Mercurial
Newer versions of Mercurial require the configuration
of Certification Authorities.

R=rsc
CC=golang-dev
https://golang.org/cl/4128052
2011-02-02 15:53:32 -08:00
Robert Griesemer
bd4e49f524 Effective Go: fix typo
Fixes #1467.

R=r, r2
CC=golang-dev
https://golang.org/cl/3981054
2011-02-02 11:02:56 -08:00
Andrew Gerrand
7aa758df0c release.2011-02-01
R=rsc
CC=golang-dev
https://golang.org/cl/4119050
2011-02-02 10:59:59 +11:00
Robert Griesemer
7fc4e37853 go spec: s/log.Crash/log.Panic/
There is no log.Crash.

R=r, rsc
CC=golang-dev
https://golang.org/cl/4058048
2011-02-01 12:51:10 -08:00
Rob Pike
eea18d959e log: rename Exit* to Fatal*
This aligns the naming scheme with the testing package and
also lets govet work on more logging calls.

R=rsc
CC=golang-dev
https://golang.org/cl/4001048
2011-02-01 12:47:35 -08:00
Robert Griesemer
b50ed022f5 go spec: follow-up cleanups after communication operator changes
These are syntactical changes to better reflect the communication
operator's new status in the language.

- sending to a channel is now done via a send statement
- there is no binary communication operation anymore which
  leads to a reduction of the number of precedence levels
  from 6 to 5 (yeah!)
- small semantic change: since a send operation is not part
  of the expression syntax anymore, a <- send operator is
  binding weaker than any other operator now
- receiving from a channel is done as before via the unary
  receive expression
- communication clauses in select statement now can contain
  send statements or receive expressions

R=rsc, r, iant, ken2, gri1
CC=golang-dev
https://golang.org/cl/3973051
2011-02-01 12:02:49 -08:00
Russ Cox
614391860a ebnflint: exit with non-zero status on error
Tweak spec to avoid ebnflint complaints.

R=gri
CC=golang-dev
https://golang.org/cl/3973050
2011-01-31 17:42:10 -05:00
Rob Pike
6990bc124f doc/progs: make sure all programs compile and run
Fixes #1455.

R=rsc
CC=golang-dev
https://golang.org/cl/4079055
2011-01-31 14:41:36 -08:00
Rob Pike
61978aa579 effective go: remove non-blocking ops in leaky bucket example
R=rsc
CC=golang-dev
https://golang.org/cl/4029048
2011-01-31 12:46:38 -08:00
Russ Cox
634cef25c3 doc/codelab/wiki: fixes
make test.sh runnable as a command.
announce only on 127.0.0.1.
rebuild final-test.bin when final-test.go changes.

R=adg, r
CC=golang-dev
https://golang.org/cl/4030044
2011-01-28 09:42:51 -05:00
Russ Cox
19d9a40845 spec: remove non-blocking channel operators
Add intended changes for close + closed, commented out.

R=golang-dev, niemeyer, r, gri1
CC=golang-dev
https://golang.org/cl/4013045
2011-01-27 15:34:28 -05:00
Andrew Gerrand
5899cab037 doc/codelab/wiki: tests use available TCP port
R=bradfitz, dsymonds, r2, dangabrad, rsc
CC=golang-dev
https://golang.org/cl/4043043
2011-01-27 23:19:37 +10:00
Andrew Gerrand
9ec785af2f doc/codelab/wiki: replace curl with a Go program
R=rsc, bradfitzgo
CC=golang-dev
https://golang.org/cl/4087043
2011-01-27 10:32:41 +10:00
Robert Griesemer
0e1d941e5c go spec: clarify address operators.
Fixes #1445.

R=r, rsc, iant, ken2
CC=golang-dev
https://golang.org/cl/4109041
2011-01-26 11:21:23 -08:00
Rob Pike
a64e63227a faq: fix minor errors in programs reported by Wojciech Mikanik
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4114041
2011-01-26 10:41:32 -08:00
Russ Cox
bba20fc1fa codelab/wiki: fix freebsd build
TBR=adg
CC=golang-dev
https://golang.org/cl/4092042
2011-01-26 13:02:09 -05:00
Russ Cox
770acbe7b8 codelab/wiki: fix build
TBR=adg
CC=golang-dev
https://golang.org/cl/4077045
2011-01-26 12:54:07 -05:00
Andrew Gerrand
549d7f49d5 doc/codelab/wiki: rename textarea name from Body to body
R=mattn
CC=golang-dev
https://golang.org/cl/4034046
2011-01-26 17:25:37 +10:00
Andrew Gerrand
add4e167e3 doc/codelab/wiki: update to work with template changes, add to run.bash
Fixes #1444.

R=rsc, r
CC=golang-dev
https://golang.org/cl/3979045
2011-01-26 14:56:52 +10:00
Russ Cox
27c74d3499 spec, runtime, tests: send on closed channel panics
Close of closed channel panics.
Receive from closed channel never panics,
even if done repeatedly.

Fixes #1349.
Fixes #1419.

R=gri, iant, ken2, r, gri1, r2, iant2, rog, albert.strasheim, niemeyer, ejsherry
CC=golang-dev
https://golang.org/cl/3989042
2011-01-21 15:07:13 -05:00
Robert Griesemer
955aa159ad godoc: show line numbers for non-go files (bug fix)
Also: Give line numbers a style and make them less intrusive.

R=rsc
CC=golang-dev
https://golang.org/cl/4060043
2011-01-20 10:43:55 -08:00
Russ Cox
34c1b13c2a release.2011-01-20
R=r, adg
CC=golang-dev
https://golang.org/cl/3998045
2011-01-20 00:02:59 -05:00
Rob Pike
80e25fc923 docs: float->float64 plus a couple of other tweaks.
R=rsc, gri
CC=golang-dev
https://golang.org/cl/3978042
2011-01-19 23:07:38 -05:00
Robert Griesemer
b94c0d2a77 go spec: remove float, complex in favor of float64 and complex128
The default float type is not very useful but for the most basic applications.
For instance, as it is now, using the math package requires conversions for float
variables (the arguments for math functions are usually float64). Typical real
applications tend to specify the floating point precision required.

This proposal removes the predeclared types float and complex. Variable declarations
without type specification but with constant floating point or complex initializer
expressions will assume the type float64 or complex128 respectively.

The predeclared function cmplx is renamed to complex.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/3423041
2011-01-19 23:07:21 -05:00
Andrew Gerrand
4b7fab83b5 release.2011-01-19
R=r, rsc, r2
CC=golang-dev
https://golang.org/cl/4087041
2011-01-20 14:01:32 +11:00
Robert Griesemer
dfc5bb5ff6 go spec: adjust language for constant typing
Fixes #1421.

R=r, rsc, iant, ken2
CC=golang-dev
https://golang.org/cl/4039042
2011-01-19 10:33:41 -08:00
Rob Pike
eaade07d63 tutorial: update go_tutorial.txt
should have been included in last CL; no idea why it was not

R=brainman
CC=golang-dev
https://golang.org/cl/4005043
2011-01-18 11:07:02 -08:00
Rob Pike
166b444a93 tutorial: make stdin, stdout, stderr work on Windows.
R=brainman
CC=golang-dev
https://golang.org/cl/4042042
2011-01-18 11:01:47 -08:00
Robert Griesemer
97025ebfef go_spec: specify that int and uint have the same size
R=r, rsc, iant, ken2
CC=golang-dev
https://golang.org/cl/3992041
2011-01-13 10:24:04 -08:00
Andrew Gerrand
c3e33975aa release.2011-01-12
R=r
CC=golang-dev
https://golang.org/cl/3972041
2011-01-13 12:04:43 +11:00