commit 2b0d7f0836b87dd346e3a815d3bbb593f8e1a3f6 [browse]
Author: Andrew Gerrand
Date: 2011-10-06 15:56:02 -07:00

weekly.2011-10-06

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5207044

commit b3dd32776b194e2b24bc47768624360452c04bd8 [browse]
Author: Rob Pike
Date: 2011-10-06 15:21:56 -07:00

template: fix comments with different delimiters.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5208042

commit dcf53189900b814925475b09770092d06f362ebc [browse]
Author: Rob Pike
Date: 2011-10-06 13:30:50 -07:00

template: add method Delims to allow alternate action delimiters.

R=golang-dev, rsc, dsymonds
CC=golang-dev
https://golang.org/cl/5209045

commit edacc863d0dd3806fd2caf869a99852d39c8ed08 [browse]
Author: Andrew Gerrand
Date: 2011-10-06 13:12:11 -07:00

doc: remove errant console.log from godocs.js

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5211045

commit af1ae438b9218d5dbdb0bf0c756de1e3d4691551 [browse]
Author: Andrew Gerrand
Date: 2011-10-06 11:56:17 -07:00

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

clone the repository to get more history