From 5b7d422a05652893e27fc8393f9435ec2386bc83 Mon Sep 17 00:00:00 2001 From: Oling Cat Date: Sat, 1 Jun 2013 10:28:04 -0400 Subject: [PATCH] doc/go1.1.html: remove extra space; close some tags. R=golang-dev, r CC=golang-dev https://golang.org/cl/9941043 --- doc/go1.1.html | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/doc/go1.1.html b/doc/go1.1.html index f13858927cd..a68664954ad 100644 --- a/doc/go1.1.html +++ b/doc/go1.1.html @@ -118,7 +118,7 @@ func (w *bufio.Writer, p []byte) (n int, err error) {

Return requirements

-Before Go 1.1, a function that returned a value needed an explicit "return" +Before Go 1.1, a function that returned a value needed an explicit "return" or call to panic at the end of the function; this was a simple way to make the programmer be explicit about the meaning of the function. But there are many cases @@ -131,7 +131,7 @@ In Go 1.1, the rule about final "return" statements is more permissive. It introduces the concept of a terminating statement, a statement that is guaranteed to be the last one a function executes. -Examples include +Examples include "for" loops with no condition and "if-else" statements in which each half ends in a "return". If the final statement of a function can be shown syntactically to @@ -172,7 +172,7 @@ from the traditional Unix flag parsing. This may affect scripts that invoke the tool directly. For example, go tool 6c -Fw -Dfoo must now be written -go tool 6c -F -w -D foo. +go tool 6c -F -w -D foo.

Size of int on 64-bit platforms

@@ -197,6 +197,7 @@ However, programs that contain implicit assumptions that int is only 32 bits may change behavior. For example, this code prints a positive number on 64-bit systems and a negative one on 32-bit systems: +

 x := ^uint32(0) // x is 0xffffffff
@@ -294,7 +295,7 @@ variable, where at least one of the accesses is a write.
 This new facility is built into the go tool.
 For now, it is only available on Linux, Mac OS X, and Windows systems with
 64-bit x86 processors.
-To enable it, set the -race flag when building or testing your program 
+To enable it, set the -race flag when building or testing your program
 (for instance, go test -race).
 The race detector is documented in a separate article.
 

@@ -331,7 +332,7 @@ including a list of paths searched, when a package cannot be located. $ go build foo/quxx can't load package: package foo/quxx: cannot find package "foo/quxx" in any of: /home/you/go/src/pkg/foo/quxx (from $GOROOT) - /home/you/src/foo/quxx (from $GOPATH) + /home/you/src/foo/quxx (from $GOPATH)

@@ -343,12 +344,12 @@ command, a valid $GOPATH is now

 $ GOPATH= go get code.google.com/p/foo/quxx
-package code.google.com/p/foo/quxx: cannot download, $GOPATH not set. For more details see: go help gopath 
+package code.google.com/p/foo/quxx: cannot download, $GOPATH not set. For more details see: go help gopath
 

Finally, as a result of the previous change, the go get command will also fail -when $GOPATH and $GOROOT are set to the same value. +when $GOPATH and $GOROOT are set to the same value.

@@ -427,7 +428,7 @@ To build a file only with Go 1.0.x, use the converse constraint:
 
 

The Go 1.1 tool chain adds experimental support for freebsd/arm, -netbsd/386, netbsd/amd64, netbsd/arm, +netbsd/386, netbsd/amd64, netbsd/arm, openbsd/386 and openbsd/amd64 platforms.

@@ -546,7 +547,7 @@ The Go 1.1 implementation instead returns a to allow reading and writing with its ReadFrom -and +and WriteTo methods.

@@ -665,6 +666,7 @@ This function addresses a common source of confusion in the time API. Updating: Code that needs to read and write times using an external format with lower precision should be modified to use the new methods. +

Exp and old subtrees moved to go.exp and go.text subrepositories

@@ -732,7 +734,7 @@ See the relevant package documentation for more information about each change.