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
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
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
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
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
- 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
- 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
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