Rob Pike
76cf6bac07
doc/articles/defer_panic_recover.html: minor tweaks
...
Delete () from function names and change the reference to some
functions to the correct term, methods.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5874063
2012-03-23 17:40:27 +11:00
Rob Pike
fc9f65a6a0
doc/articles/image_draw.html: fix circle example
...
It was showing the same snippet twice instead of the type definition and snippet.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5875045
2012-03-23 17:02:21 +11:00
Yasuhiro Matsumoto
782feeb765
doc/godoc.js: fix error on IE8.
...
* implement simple getElementsByClassName for IE8.
* remove some lint warnings.
Fixes #3318 .
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5881054
2012-03-23 12:23:53 +11:00
Andrew Gerrand
145c48c1d1
weekly.2012-03-22
...
R=golang-dev, r, dave
CC=golang-dev
https://golang.org/cl/5876068
2012-03-23 11:56:54 +11:00
Ian Lance Taylor
5ac186975c
doc/articles/c_go_cgo.html: correct "C" comment to mention #cgo
...
Also fix invalid apostrophe characters.
R=r, gri, adg
CC=golang-dev
https://golang.org/cl/5874058
2012-03-22 17:44:28 -07:00
Rob Pike
a99e9c5db5
doc/articles: rename concurrency patterns article
...
The old name, automatically generated, was ludicrously verbose.
Also clean up an example to use time.Second.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5876051
2012-03-23 07:51:16 +11:00
Rob Pike
2795a15c0c
doc/articles/gobs_of_data.html: delete extra word
...
Putt putt putt our way towards felicity.
R=golang-dev, bsiegert
CC=golang-dev
https://golang.org/cl/5874048
2012-03-22 19:20:03 +11:00
Francisco Souza
289a357104
doc: add JSON and Go article
...
Originally published on The Go Programming Language Blog, January 25, 2011.
http://blog.golang.org/2011/01/json-and-go.html
R=adg
CC=golang-dev
https://golang.org/cl/5846044
2012-03-22 18:25:40 +11:00
Rob Pike
cec67568e9
doc/articles/go_command.html: nits
...
Fix some English mistakes and minor inaccuracies.
R=golang-dev, jsing
CC=golang-dev
https://golang.org/cl/5885046
2012-03-22 17:59:06 +11:00
Francisco Souza
2b3d6cb5e6
doc: fix typo in The Laws of Reflection article
...
R=golang-dev, gri, r
CC=golang-dev
https://golang.org/cl/5876047
2012-03-21 16:42:04 -07: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
Ian Lance Taylor
a84e3baf9a
doc: general update of gccgo_install
...
Fixes #3325 .
R=golang-dev, bradfitz, minux.ma, r
CC=golang-dev
https://golang.org/cl/5858043
2012-03-20 14:16:34 -07:00
Shenghou Ma
9dbfda5857
doc/debugging_with_gdb: format & content update
...
R=adg, lvd
CC=golang-dev
https://golang.org/cl/5845065
2012-03-21 00:42:53 +08:00
Andrew Gerrand
abdb4dbe2c
cmd/godoc: inform users that the playground doesn't work via local godoc
...
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5843065
2012-03-20 14:11:38 +11:00
Andrew Gerrand
58aac1d0ff
doc: remove defunct playground.html
...
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5846071
2012-03-20 14:11:17 +11:00
Andrew Gerrand
2a5879d1e2
doc: replace mentions of 6g with gc or the go command
...
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5846070
2012-03-20 13:50:05 +11:00
Shenghou Ma
d05b386928
doc: update format for "C? Go? Cgo!" article
...
R=adg
CC=golang-dev
https://golang.org/cl/5841050
2012-03-19 22:54:06 +08:00
Andrew Gerrand
6230569e84
doc: move sub-repos lower on reference page
...
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5846065
2012-03-19 13:52:26 +11:00
Jeremy Jackins
7e054266c9
doc: various typos, remove apostrophes from ordinals
...
R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/5845059
2012-03-19 08:26:36 +11:00
Rob Pike
883a96d950
spec: delete references to unsafe.Reflect,Typeof,Unreflect
...
They have been deleted from package unsafe.
Also delete their appearance in exp/types.
Fixes #3338 .
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5847056
2012-03-17 22:50:59 +11:00
Shenghou Ma
1dd78b7e7b
doc/install: remove reference to "Go Tutorial"
...
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5841054
2012-03-17 18:13:02 +08:00
Shenghou Ma
c3eaef71ab
doc/go_faq: minor update
...
R=adg, r
CC=golang-dev
https://golang.org/cl/5849052
2012-03-17 15:53:40 +08: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
Francisco Souza
9e03dcb3fa
doc: add Gobs of data article
...
Originally published on The Go Programming Language Blog, March 24, 2011.
http://blog.golang.org/2011/03/gobs-of-data.html
R=adg
CC=golang-dev
https://golang.org/cl/5834043
2012-03-16 08:21:13 +11:00
Stefan Nilsson
ed77d6f04d
doc: add missing quotation mark
...
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5833047
2012-03-15 14:06:15 -04:00
Yasuhiro Matsumoto
aec01c3627
doc/play: use []rune insetead of []int.
...
R=golang-dev
CC=golang-dev
https://golang.org/cl/5823058
2012-03-15 19:28:07 +11:00
Andrew Gerrand
d528f52d87
cmd/godoc: add toys, tour button to playground
...
Fixes #3241 .
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5835043
2012-03-15 17:44:47 +11:00
Francisco Souza
235863cb12
doc: add "Godoc: documenting Go code" article
...
Originally published on The Go Programming Language Blog, March 31, 2011.
http://blog.golang.org/2011/03/godoc-documenting-go-code.html
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5830043
2012-03-15 14:51:44 +11:00
Stefan Nilsson
f00872527b
doc: add reference to FAQ to explain warning about concrete type
...
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5820048
2012-03-15 09:15:16 +11:00
Andrew Gerrand
9d08068d21
godoc: style example headings like links
...
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5819048
2012-03-15 08:09:54 +11:00
Francisco Souza
5659826e43
doc: add Go Concurrency Patterns: Timing out, moving on article
...
Originally published on The Go Programming Language Blog, September 23, 2010.
http://blog.golang.org/2010/09/go-concurrency-patterns-timing-out-and.html
Update #2547 .
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5815044
2012-03-14 13:03:11 +11:00
Johan Euphrosine
fef92cbbac
doc: add Go image/draw package article and convert code snippets to Go1.
...
Originally published on The Go Programming Language Blog, September 29, 2011.
http://blog.golang.org/2011/09/go-imagedraw-package.html
Update #2547 .
R=golang-dev, adg, rsc
CC=golang-dev
https://golang.org/cl/5755057
2012-03-14 11:27:41 +11:00
Andrew Gerrand
9ef03fdf77
weekly.2012-03-13
...
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5754097
2012-03-13 16:39:52 +11:00
Andrew Gerrand
f4bf4c3b2f
doc: update weekly notes, untag weekly
...
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5783093
2012-03-13 16:32:23 +11:00
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