An unindented XML example is hard to follow. MarshalIndent
allows moving the example over to a test file (and fixing it).
R=golang-dev, r, gustavo, r, rsc
CC=golang-dev
https://golang.org/cl/5674050
It depended on old behavior of functions in structs.
Solved by adding a boolean method to check .Run != nil.
R=golang-dev, adg, r, rsc
CC=golang-dev
https://golang.org/cl/5674062
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
Whoops. Consume the body of the first request
before making the subsequent /quit request.
R=golang-dev, untheoretic
CC=golang-dev
https://golang.org/cl/5674054
Also: Simplified handling of selector expressions. As a result, complicated
multi-line expressions containing selectors and calls/indices with arguments
broken accross lines don't get indented the same way as before, but the change
is minimal (see tests) and there's no such code in the std library. It seems
a worthwhile compromise given the much simpler code.
Applied gofmt -w $GOROOT/src $GOROOT/misc .
Fixes#1847.
R=rsc
CC=golang-dev
https://golang.org/cl/5675062
Makes it possible to run
GOARCH=amd64 make.bash
GOARCH=386 make.bash --no-clean
to avoid deleting some of the work done by the first one.
R=golang-dev
CC=golang-dev
https://golang.org/cl/5673056
When I build it, I got:
/home/njubee/work/golang/doc/codewalk/markov.go:124: undefined: time.Nanoseconds
time.Nanoseconds() does not exist now, use time.Now().UnixNano() instead
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5668044
Changeset 36c9c7810f14 broke support for grsec-patched kernels.
Those do not give back the address requested without MAP_FIXED,
so when verifying an mmap without this flag for success, the
resulting address must not be compared against the requested
address since it may have succeeded at a different location.
R=golang-dev, rsc, gustavo, iant
CC=golang-dev
https://golang.org/cl/5650072
Apparently some distros don't let you ptrace attach
to your own existing processes.
Run strace on the child directly, instead, which
reportedly is more often allowed, and makes the
code simpler too.
R=golang-dev, n13m3y3r
CC=golang-dev
https://golang.org/cl/5675050
Before this, make.bash --dist-tool would fail,
because $GOROOT/bin/tool was being mkdir'd
instead of $GOROOT/pkg/tool/linux_amd64.
R=rsc
CC=golang-dev
https://golang.org/cl/5666046