David Symonds
4101469ccc
doc: adjust indentation in Effective Go commentary example.
...
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/7225080
2013-02-13 16:43:55 +11:00
Russ Cox
f8284b64ce
doc/effective_go.html: add a section about the blank identifier
...
R=golang-dev, minux.ma, bradfitz, adg
CC=golang-dev
https://golang.org/cl/7134056
2013-01-22 14:00:10 -05:00
Nigel Tao
c8c8ab08ed
doc: fix effective_go: s/byte array/byte slice/.
...
R=rsc
CC=golang-dev, mdempsky
https://golang.org/cl/7062049
2013-01-19 13:36:59 +11:00
Nigel Tao
3e2a888753
doc/effective_go: don't use ALL_CAPS for variable names.
...
R=r, dsymonds
CC=golang-dev
https://golang.org/cl/6826070
2012-11-08 11:55:46 +11:00
Mikio Hara
b602c3dbbd
all: clear execute bit
...
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6826044
2012-11-01 10:04:42 +09:00
Rob Pike
0cd0c3e8ca
effective_go: s/usr/home/ in example
...
When I was a lad (and well past), users were in /usr;
now they're somewhere else, I'm told.
Kids today.
Fixes #4122 .
R=golang-dev, dsymonds, rsc
CC=golang-dev
https://golang.org/cl/6552060
2012-09-23 10:44:56 +10:00
Oling Cat
e93891f348
doc/effective_go: Closed some tags; removed extra spaces.
...
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/6488122
2012-09-18 08:50:24 -07:00
Rob Pike
f3fc0090f4
effective_go: use html/template instead of text/template
...
Should have done this a long time ago.
Fixes #3811 .
R=golang-dev, adg, rsc
CC=golang-dev
https://golang.org/cl/6488120
2012-09-13 13:41:13 -07:00
Shenghou Ma
5b7562dd6f
doc/progs: use test/run.go for testing on Windows
...
cgo[1-4].go, go1.go couldn't be tested now
(cgo[1-4].go can only be tested when cgo is enabled, go1.go
contain a list of filenames in the current directory)
R=golang-dev, alex.brainman, rsc
CC=golang-dev
https://golang.org/cl/6218048
2012-09-03 03:49:03 +08:00
Jongmin Kim
08f919f462
doc/effective_go.html: fixed the Request channel parameter
...
R=golang-dev, r
CC=golang-dev, gri
https://golang.org/cl/6010051
2012-04-13 15:22:40 +10:00
Aaron Kemp
cb871ce3e0
doc/effective_go.html: Add missing '...' for fmt.Sprintf()
...
The '...' was missing on a call to fmt.Sprintf() which would result in
the slice being printed instead of the correct result.
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5967051
2012-03-30 17:51:24 -07:00
Rob Pike
4074795e15
effective_go: cleanups and fixes
...
Also explain the situation with recursive String methods more accurately,
and clean up the code now that the fmt package is more careful.
R=golang-dev, minux.ma, bradfitz
CC=golang-dev
https://golang.org/cl/5907047
2012-03-25 11:34:51 +11:00
Robert Griesemer
b8b308d184
doc/effective_go.html: undo local font change
...
R=r
CC=golang-dev
https://golang.org/cl/5876043
2012-03-21 14:29:16 -07:00
Shenghou Ma
0532f4d382
doc/effective_go: minor corrections
...
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5848063
2012-03-21 09:33:55 -07:00
Brad Fitzpatrick
e5102b35f6
doc: remove reference to deleted os.ENOSPC
...
R=golang-dev, gri, r, r
CC=golang-dev
https://golang.org/cl/5866046
2012-03-20 16:50:51 -07:00
David Symonds
e5cc09a75d
doc: use time.Duration in Effective Go.
...
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5841044
2012-03-16 14:27:11 +11: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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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