diff options
-rw-r--r-- | .zsh/zshenv/80_go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/.zsh/zshenv/80_go b/.zsh/zshenv/80_go index 4ef13c9..bcb1c89 100644 --- a/.zsh/zshenv/80_go +++ b/.zsh/zshenv/80_go @@ -10,14 +10,16 @@ _GOROOT=$HOME/src/go if [ -d $_GOROOT ] ; then - export GOROOT=$_GOROOT - arch="$(uname -m)" - case "$arch" in + export GOROOT=$_GOROOT + arch="$(uname -m)" + case "$arch" in x86_64) export GOARCH="amd64";; i*86) export GOARCH="386";; *) export GOARCH="unsupported";; - esac + esac + os="$(uname)" + case "$os" in Linux) export GOOS="linux";; Darwin) export GOOS="darwin";; |