Convert cryptotype to general go1rename fix.
Add os.Exec -> syscall.Exec fix along with new
URL fixes.
Fixes#2946.
R=golang-dev, r, dsymonds
CC=golang-dev
https://golang.org/cl/5672072
We want to be able to implement good Windows support
after Go 1. Right now Windows tries to use Unix domain
sockets, and I'd rather just have it not be available.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5671076
The set of errors forwarded by the os package varied with system and
was therefore non-portable.
Three helpers added for portable error checking: IsExist, IsNotExist, and IsPermission.
One or two more may need to come, but let's keep the set very small to discourage
thinking about errors that way.
R=mikioh.mikioh, gustavo, r, rsc
CC=golang-dev
https://golang.org/cl/5672047
It was being skipped due to an oversight.
Also adjust naming parameters for map type construction - makes debugging easier.
Prelude to issue 3026.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5674071
Clang 3.1 has more warnings enabled by default than GCC.
Combined with -Werror, they cause the build to fail
unnecessarily. if the name of our compiler ends in "clang",
add the necessary extra -Wno options. Ideally we would add
these flags unconditionally, as GCC is supposed to ignore
unknown -Wno flags, but apple's llvm-gcc doesn't.
Fixes#2878.
R=rsc, dave
CC=golang-dev
https://golang.org/cl/5673055
Periodically browse MHeap's freelists for long unused spans and release them if any.
Current hardcoded settings:
- GC is forced if none occured over the last 2 minutes.
- spans are handed back after 5 minutes of uselessness.
SysUnused (for Unix) is a wrapper on madvise MADV_DONTNEED on Linux and MADV_FREE on BSDs.
R=rsc, dvyukov, remyoudompheng
CC=golang-dev
https://golang.org/cl/5451057
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