# zshenv/80_go # # Set variables related to the Go programming language # # Copyright © 2010-2017 Tobias Klauser # Released under the terms of the Artistic Licence 2.0 # # Source repository: git://git.distanz.ch/dotfiles/zsh.git _GOROOT="/usr/local/go" if [ -d $_GOROOT ] ; then export GOROOT="$_GOROOT" export GOPATH="$HOME/go" arch="$(uname -m)" case "$arch" in x86_64) export GOARCH="amd64";; i*86) export GOARCH="386";; *) export GOARCH="unsupported";; esac os="$(uname)" case "$os" in Linux) export GOOS="linux";; Darwin) export GOOS="darwin";; *) export GOOS="unsupported";; esac path_append $GOROOT/bin if [ -d $GOPATH/bin ] ; then path_append $GOPATH/bin fi fi # vim:ft=zsh