diff --git a/doc/install.html b/doc/install.html index d94d6a9368b80a..9264f3a0d07a02 100644 --- a/doc/install.html +++ b/doc/install.html @@ -3,10 +3,12 @@ "Path": "/doc/install" }--> +
+

Download the Go distribution

- + Download Go Click here to visit the downloads page @@ -60,6 +62,8 @@

System requirements

Downloads preferences panel.

+
+

Install the Go tools

@@ -68,6 +72,8 @@

Install the Go tools

first remove the existing version.

+
+

Linux, Mac OS X, and FreeBSD tarballs

@@ -77,10 +83,10 @@

Linux, Mac OS X, and FreeBSD tarballs

-tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz
+tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz
 
-

+

Choose the archive file appropriate for your installation. For instance, if you are installing Go version 1.2.1 for 64-bit x86 on Linux, the archive you want is called go1.2.1.linux-amd64.tar.gz. @@ -125,6 +131,10 @@

Installing to a custom location

location.

+
+ +
+

Mac OS X package installer

@@ -139,15 +149,21 @@

Mac OS X package installer

Terminal sessions for the change to take effect.

+
+ +
+

Windows

-

+

The Go project provides two installation options for Windows users (besides installing from source): a zip archive that requires you to set some environment variables and an MSI installer that configures your installation automatically.

+
+

MSI installer

@@ -162,6 +178,10 @@

MSI installer

command prompts for the change to take effect.

+
+ +
+

Zip archive

@@ -177,6 +197,8 @@

Zip archive

Add the bin subdirectory of your Go root (for example, c:\Go\bin) to your PATH environment variable.

+
+

Setting environment variables under Windows

@@ -186,15 +208,38 @@

Setting environment variables under Windows

Settings" option inside the "System" control panel.

+
+

Test your installation

-Check that Go is installed correctly by building a simple program, as follows. +Check that Go is installed correctly by setting up a workspace +and building a simple program, as follows. +

+ +

+Create a directory to contain your workspace, +$HOME/work for example, and set the GOPATH environment +variable to point to that location. +

+ +
+$ export GOPATH=$HOME/work
+
+ +

+You should put the above command in your shell startup script +($HOME/.profile for example) or, if you use Windows, +follow the instructions above to set the +GOPATH environment variable on your system.

-Create a file named hello.go and put the following program in it: +Next, make the directories src/github.com/user/hello inside your +workspace (if you use GitHub, substitute your user name for user), +and inside the hello directory create a file named hello.go +with the following contents:

@@ -208,29 +253,32 @@ 

Test your installation

-Then run it with the go tool: +Then compile it with the go tool:

-$ go run hello.go
-hello, world
+$ go install github.com/user/hello
 

-If you see the "hello, world" message then your Go installation is working. +The above command will put an executable command named hello +(or hello.exe) inside the bin directory of your workspace. +Execute the command to see the greeting:

- -

Set up your work environment

+
+$ $GOPATH/bin/hello
+hello, world
+

-You're almost done. -You just need to set up your environment. +If you see the "hello, world" message then your Go installation is working.

-Read the How to Write Go Code document, -which provides essential setup instructions for using the Go tools. +Before rushing off to write Go code please read the +How to Write Go Code document, +which describes some essential concepts about using the Go tools.

diff --git a/doc/root.html b/doc/root.html index 3c6de2e46c7245..121736853002e9 100644 --- a/doc/root.html +++ b/doc/root.html @@ -53,7 +53,7 @@
- + Download Go Binary distributions available for