-
Andrew Gerrand authored
go/doc: move Examples to go/ast cmd/go: use go/doc to read examples src/pkg: update examples to use new convention This is to make whole file examples more readable. When presented as a complete function, preceding an Example with its output is confusing. The new convention is to put the expected output in the final comment of the example, preceded by the string "output:" (case insensitive). An idiomatic example looks like this: // This example demonstrates Foo by doing bar and quux. func ExampleFoo() { // example body that does bar and quux // Output: // example output } R=rsc, gri CC=golang-dev https://golang.org/cl/5673053
11e113db
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
asm_386.s | ||
asm_amd64.s | ||
asm_arm.s | ||
buffer.go | ||
buffer_test.go | ||
bytes.go | ||
bytes_decl.go | ||
bytes_test.go | ||
example_test.go | ||
export_test.go | ||
reader.go | ||
reader_test.go |