From: Kevin Burke cgo
, set the environment variable
Change to the directory that will be its parent
and make sure the go
directory does not exist.
Then clone the repository and check out the latest release tag
-(go1.7.2
, for example):
go1.7.4
, for example):
$ git clone https://go.googlesource.com/go @@ -329,7 +329,7 @@ You just need to do a little more setup.-The How to Write Go Code document +The How to Write Go Code document provides essential setup instructions for using the Go tools.
@@ -355,7 +355,7 @@ $ go get golang.org/x/tools/cmd/godoc
-To install these tools, the go
get
command requires
+To install these tools, the go
get
command requires
that Git be installed locally.
go1.7.2
.
+go1.7.4
.
@@ -443,7 +443,7 @@ The value assumed by installed binaries and scripts when
$GOROOT
is not set explicitly.
It defaults to the value of $GOROOT
.
If you want to build the Go tree in one location
-but move it elsewhere after the build, set
+but move it elsewhere after the build, set
$GOROOT_FINAL
to the eventual location.
$GOOS
and
$GOARCH
, listed above.
The specified values must be compatible with the local system.
-For example, you should not set $GOHOSTARCH
to
+For example, you should not set $GOHOSTARCH
to
arm
on an x86 system.
@@ -627,7 +627,7 @@ not amd64
.
If you choose to override the defaults,
set these variables in your shell profile ($HOME/.bashrc
,
-$HOME/.profile
, or equivalent). The settings might look
+$HOME/.profile
, or equivalent). The settings might look
something like this: