]> Cypherpunks repositories - gostls13.git/commitdiff
doc: propose $GOPATH as $HOME/work, not $HOME/go
authorAndrew Gerrand <adg@golang.org>
Tue, 16 Dec 2014 01:16:25 +0000 (12:16 +1100)
committerAndrew Gerrand <adg@golang.org>
Tue, 16 Dec 2014 04:35:09 +0000 (04:35 +0000)
Related to issue #9228

Change-Id: I0819e657f6393788754d1412f9c2126a170d4cf1
Reviewed-on: https://go-review.googlesource.com/1577
Reviewed-by: Rob Pike <r@golang.org>
doc/code.html

index a4638f9ffbb9a6e47a00c865ee18a4e3e19083f5..2141fb6551c85b1a17e275344c2b3365ef352d64 100644 (file)
@@ -108,13 +108,14 @@ when developing Go code.
 <p>
 To get started, create a workspace directory and set <code>GOPATH</code>
 accordingly. Your workspace can be located wherever you like, but we'll use
-<code>$HOME/go</code> in this document. Note that this must <b>not</b> be the
+<code>$HOME/work</code> in this document. Note that this must <b>not</b> be the
 same path as your Go installation.
+(Another common setup is to set <code>GOPATH=$HOME</code>.)
 </p>
 
 <pre>
-$ <b>mkdir $HOME/go</b>
-$ <b>export GOPATH=$HOME/go</b>
+$ <b>mkdir $HOME/work</b>
+$ <b>export GOPATH=$HOME/work</b>
 </pre>
 
 <p>
@@ -218,7 +219,7 @@ This command builds the <code>hello</code> command, producing an executable
 binary. It then installs that binary to the workspace's <code>bin</code>
 directory as <code>hello</code> (or, under Windows, <code>hello.exe</code>).
 In our example, that will be <code>$GOPATH/bin/hello</code>, which is
-<code>$HOME/go/bin/hello</code>.
+<code>$HOME/work/bin/hello</code>.
 </p>
 
 <p>
@@ -254,7 +255,7 @@ optional: you do not need to use source control to write Go code.
 <pre>
 $ <b>cd $GOPATH/src/github.com/user/hello</b>
 $ <b>git init</b>
-Initialized empty Git repository in /home/user/go/src/github.com/user/hello/.git/
+Initialized empty Git repository in /home/user/work/src/github.com/user/hello/.git/
 $ <b>git add hello.go</b>
 $ <b>git commit -m "initial commit"</b>
 [master (root-commit) 0b4507d] initial commit