Hey everyone,
I'm trying to get Google's new language "Go" working on my machine, but I'm having some trouble setting the environment variables.
Google asks you to set the following:
Quote:
$GOROOT
The root of the Go tree. Typically this is $HOME/go but it can be any directory.
$GOOS and $GOARCH
The name of the target operating system and compilation architecture. Choices for $GOOS are linux, darwin (Mac OS X 10.5 or 10.6), and nacl (Native Client, an incomplete port). Choices for $GOARCH are amd64 (64-bit x86, the most mature port), 386 (32-bit x86), and arm (32-bit ARM, an incomplete port). The valid combinations are linux/amd64, linux/arm, linux/386, darwin/amd64, darwin/386, and nacl/386.
$GOBIN (optional)
The location where binaries will be installed. If you set $GOBIN, you need to ensure that it is in your $PATH so that newly built Go-specific command such as the compiler can be found during the build. The default, $HOME/bin, may already be in your $PATH.
Note that $GOARCH and $GOOS identify the target environment, not the environment you are running on. In effect, you are always cross-compiling.
|
I edited my .bashrc to look like this at the end:
Code:
export $GOROOT=$HOME/go/
export $GOOS=linux
export $GOARCH=386
Am I doing something wrong? Because no matter what I try it doesn't seem to work. I don't have much experience with environment variables, but it seems fairly straight forward.
Thanks!