From edc7b4739d750b7954a588a2a6b359db90861da3 Mon Sep 17 00:00:00 2001
From: Shenghou Ma select
statement to receive from either
ch
or timeout
. If nothing arrives on ch
after one second, the timeout case is selected and the attempt to read from
-ch
is abandoned.
Rectangle
is inclusive at the top-left and exclusive at the
bottom-right. For a Point p
and a Rectangle r
,
p.In(r)
if and only if
-r.Min.X <= p.X && p.X < r.Max.X
, and similarly for Y
. This is analagous to how
+r.Min.X <= p.X && p.X < r.Max.X
, and similarly for Y
. This is analagous to how
a slice s[i0:i1]
is inclusive at the low end and exclusive at the
high end. (Unlike arrays and slices, a Rectangle
often has a
non-zero origin.)
@@ -193,8 +193,8 @@ way to iterate over an Image
m's pixels looks like:
b := m.Bounds() -for y := b.Min.Y; y < b.Max.Y; y++ { - for x := b.Min.X; y < b.Max.X; x++ { +for y := b.Min.Y; y < b.Max.Y; y++ { + for x := b.Min.X; y < b.Max.X; x++ { doStuffWith(m.At(x, y)) } } diff --git a/doc/articles/json_rpc_tale_of_interfaces.html b/doc/articles/json_rpc_tale_of_interfaces.html index a545f55f612..0db366f33a4 100644 --- a/doc/articles/json_rpc_tale_of_interfaces.html +++ b/doc/articles/json_rpc_tale_of_interfaces.html @@ -57,7 +57,7 @@ original functionality. From there it is simple to build a After some similar changes to the client side, this was the full extent of the work we needed to do on the RPC package. This whole exercise took about 20 minutes! After tidying up and testing the new code, the -final changeset +final changeset was submitted. diff --git a/doc/code.html b/doc/code.html index efbe7eed025..d11685f796f 100644 --- a/doc/code.html +++ b/doc/code.html @@ -182,7 +182,7 @@ func Sqrt(x float64) float64 { // This is a terrible implementation. // Real code should import "math" and use math.Sqrt. z := 0.0 - for i := 0; i < 1000; i++ { + for i := 0; i < 1000; i++ { z -= (z*z - x) / (2 * x) } return z diff --git a/doc/install.html b/doc/install.html index ae5bffab18d..ec78d2a5a8b 100644 --- a/doc/install.html +++ b/doc/install.html @@ -41,7 +41,7 @@ proceeding. If your OS or architecture is not on the list, it's possible that- FreeBSD 7 or later amd64, 386 Debian GNU/kFreeBSD not supported + Linux 2.6.23 or later with glibc amd64, 386, arm CentOS/RHEL 5.x not supported; no binary distribution for ARM yet Linux 2.6.23 or later with glibc amd64, 386, arm CentOS/RHEL 5.x not supported; no binary distribution for ARM yet Mac OS X 10.6/10.7 amd64, 386 use the gcc† that comes with Xcode @@ -155,7 +155,7 @@ a zip archive that requires you to set some environment variables and an experimental MSI installer that configures your installation automatically. - Windows 2000 or later amd64, 386 use mingw gcc†; cygwin or msys is not needed Zip archive +
Zip archive
Extract the zip file @@ -171,7 +171,7 @@ the
-GOROOT
environment variable to your chosen path. Add thebin
subdirectory of your Go root (for example,c:\Go\bin
) to to yourPATH
environment variable.MSI installer (experimental) +
MSI installer (experimental)
Open the MSI file