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
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
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
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
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
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
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
Rob Pike
29d0f02bd2
effective go: explain the effect of repanicking better.
...
Also fix a <p> error in go_spec.html.
Fixes #1370 .
R=rsc, gri
CC=golang-dev
https://golang.org/cl/3835043
2011-01-05 11:39:57 -08:00
Nigel Tao
bf453eba90
doc: update Effective Go for template API change.
...
The original change 3378041 was submitted in December 2010:
template: change the signature of formatters for future development.
R=adg
CC=golang-dev
https://golang.org/cl/3862041
2011-01-04 15:52:03 +11:00
Kyle Consalus
009aebdba8
Removed bytes.Add and bytes.AddByte; we now have 'append'.
...
Changed all uses of bytes.Add (aside from those testing bytes.Add) to append(a, b...).
Also ran "gofmt -s" and made use of copy([]byte, string) in the fasta benchmark.
R=golang-dev, r, r2
CC=golang-dev
https://golang.org/cl/3302042
2010-12-01 11:59:13 -08:00
Rob Pike
70d0b6b242
Effective Go: correct error in recent edit: "..." is in call to Sprintln, not Output.
...
R=rsc, gri
CC=golang-dev
https://golang.org/cl/2853042
2010-11-03 11:09:43 -07:00
Rob Pike
0808b199e0
Effective Go: append and a few words about ...
...
R=rsc, gri, iant
CC=golang-dev
https://golang.org/cl/2821041
2010-11-01 21:46:04 -07:00
Rob Pike
e787f8276d
Effective Go: update examples to use new logging interface.
...
R=adg
CC=golang-dev
https://golang.org/cl/2468041
2010-10-12 16:56:50 -07:00
Rob Pike
1edfb4cc75
Effective Go: update for new http interface.
...
R=rsc, stephenm
CC=golang-dev
https://golang.org/cl/2310041
2010-09-29 11:12:52 -07:00
James Fysh
089ce17093
Documentation: Fix a bug in the example in Constants subsection
...
Not a bug per-se, the issue is that the fmt.Sprintf method inside the
ByteSize.String() method ends up calling itself to generate the String
representation of the ByteSize value. Infinite loops are bad.
Updated as per review comments
R=r
CC=golang-dev
https://golang.org/cl/1974046
2010-08-28 07:54:16 +10:00
Rob Pike
7ddbe79842
effective go: fix errors caught by HaWe
...
R=rsc
CC=golang-dev
https://golang.org/cl/1959043
2010-08-24 12:37:51 +10:00
Christopher Wedgwood
c80746aa90
doc: add missing paren (pointed out by nbjoerg)
...
R=rsc, r
CC=golang-dev
https://golang.org/cl/1983045
2010-08-19 10:03:58 +10:00
Rob Pike
4fd7880d81
Effective Go: minor change to correct a comment in an example
...
R=rsc
CC=golang-dev
https://golang.org/cl/1689042
2010-06-18 20:33:03 -07:00
Rob Pike
99b23a1e5b
Effective Go: panic and recover
...
R=rsc, iant
CC=golang-dev
https://golang.org/cl/1718042
2010-06-18 10:52:37 -07:00
Rob Pike
050905b985
Effective Go: add a section on defer.
...
R=rsc, iant
CC=golang-dev
https://golang.org/cl/1694044
2010-06-16 13:47:36 -07:00
Rob Pike
6c08859b0e
Effective Go: update ... discussion.
...
R=rsc
CC=golang-dev
https://golang.org/cl/1698041
2010-06-14 22:40:35 -07:00
Ian Lance Taylor
cd242fb480
Use the copy function rather than a loop.
...
R=r
CC=golang-dev
https://golang.org/cl/882047
2010-04-13 13:05:29 -07:00
Rob Pike
4710642d41
Effective Go: update maps description regarding lookup of nonexistent entry.
...
R=rsc, gri, iant
CC=golang-dev
https://golang.org/cl/821044
2010-03-30 11:21:50 -07:00
Andrey Mirtchovski
1f3222a57b
strings.Bytes -> []byte for documentation example, src/pkg/* comments, and htmlgen.go
...
R=rsc, adg
CC=golang-dev
https://golang.org/cl/224087
2010-03-02 11:18:22 +11:00
Andrew Gerrand
766c3ff735
effective_go: clarified small comment
...
R=rsc, cw
CC=golang-dev
https://golang.org/cl/217085
2010-02-22 14:51:22 -08:00
Rob Pike
49a35a632e
be more explicit about initialization of embedded fields.
...
R=rsc
CC=golang-dev
https://golang.org/cl/186161
2010-01-15 11:59:53 +11:00
Rob Pike
c05f86a46a
fix up YB and add ZB, EB in example
...
R=rsc
CC=golang-dev
https://golang.org/cl/183107
2010-01-04 07:36:39 +11:00
Rob Pike
77f6f16660
fix naked < and > as reported by Peter Williams <>
...
(i thought these were legal in <pre> blocks)
R=rsc
CC=golang-dev, pwil3058
https://golang.org/cl/181055
2009-12-25 07:13:14 +11:00
Rob Pike
617a6a519f
fix documentation bug in example
...
Fixes #452 .
R=gri
CC=golang-dev, dougfelt
https://golang.org/cl/181043
2009-12-23 13:47:58 +11:00
Rob Pike
163ecdac1a
new semicolon rule in effective_go.html.
...
eliminate all tab characters while we're here.
R=rsc
CC=golang-dev
https://golang.org/cl/180055
2009-12-16 12:31:18 +11:00
Rob Pike
acf4dd4d56
change the naming example from Vector to Ring due to loss of vector.New()
...
R=rsc
CC=golang-dev
https://golang.org/cl/164082
2009-12-02 13:46:02 -08:00
Rob Pike
bcb46c8560
fix typo in Append return type
...
R=rsc
https://golang.org/cl/155058
2009-11-16 21:56:38 -08:00
Adam Langley
4085364a20
doc: fix typo.
...
Fixes #218
R=r
CC=golang-dev
https://golang.org/cl/155067
2009-11-16 11:56:18 -08:00
Rob Pike
dc3b4932d8
add a paragraph about GOMAXPROCS
...
R=rsc
CC=golang-dev
https://golang.org/cl/154153
2009-11-15 13:09:43 -08:00
Rob Pike
029c39f45a
fix some typos in the documentation
...
Fixes #196 .
R=rsc
https://golang.org/cl/154152
2009-11-15 12:09:59 -08:00
Rob Pike
0c83f23d44
fix typo in ByteSize example
...
R=rsc, agl1
CC=golang-dev
https://golang.org/cl/154076
2009-11-11 19:39:57 -08:00
Russ Cox
ef7c370a20
typo
...
Fixes #69 .
R=r
https://golang.org/cl/152082
2009-11-11 14:52:38 -08:00
Rob Pike
8db6370d78
fix final program to have Html->HTML
...
R=rsc
CC=go-dev
https://golang.org/cl/152050
2009-11-10 18:24:06 -08:00
Ian Lance Taylor
cc6720aab7
Minor tweaks.
...
The text changes are trivial and may be ignored, but there are
two code corrections.
R=r, rsc
CC=go-dev
http://go/go-review/1024045
2009-11-10 00:09:53 -08:00
Russ Cox
1a821b32da
noted by kaib: explicit assignment initialization
...
didn't match the composite literal initialization.
R=r
CC=kaib
http://go/go-review/1024039
2009-11-09 17:09:33 -08:00
Russ Cox
24ce19c71d
effective go: tiny fixes
...
one real bug: *[]float -> *[3]float
R=r
http://go/go-review/1024016
2009-11-08 01:07:53 -08:00
Rob Pike
31053d4e47
add a final section with a complete example
...
R=rsc
CC=go-dev
http://go/go-review/1017033
2009-11-04 17:29:20 -08:00
Rob Pike
c2b6418c26
fixups to "effective go"
...
R=rsc
CC=go-dev
http://go/go-review/1016020
2009-11-01 20:54:11 -08:00
Rob Pike
bb3e3090c6
concurrency
...
R=go-dev, iant, rsc
http://go/go-review/1018004
2009-10-31 18:29:06 -07:00
Rob Pike
2cf9dae134
drop a couple of semicolons for consistency
...
R=rsc
DELTA=4 (0 added, 0 deleted, 4 changed)
OCL=35983
CL=35983
2009-10-21 23:05:56 -07:00
Rob Pike
6f89f3f08d
initialization
...
R=rsc
DELTA=292 (124 added, 165 deleted, 3 changed)
OCL=35936
CL=35939
2009-10-20 17:32:16 -07:00
Rob Pike
430d462391
start the concurrency discussion. work from the outside in because this is a toughie.
...
also fix a pedantry in the language design faq.
R=rsc
DELTA=113 (94 added, 16 deleted, 3 changed)
OCL=35922
CL=35928
2009-10-20 12:30:39 -07:00
Rob Pike
9f60b03610
address leftover post-submit comments about embedding
...
R=rsc
DELTA=11 (9 added, 0 deleted, 2 changed)
OCL=35872
CL=35872
2009-10-19 10:34:00 -07:00
Rob Pike
f00be0caee
more embedding. enough for now?
...
R=rsc
DELTA=51 (48 added, 0 deleted, 3 changed)
OCL=35846
CL=35853
2009-10-16 16:16:02 -07:00
Rob Pike
c58d9efc63
fix pre-submit editing typo; text is garbled.
...
R=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=35841
CL=35841
2009-10-16 11:23:45 -07:00