# 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 GOPATH="$HOME/go" arch="$(uname -m)" case "$arch" in x86_64) export GOARCH="amd64";; i*86) export GOARCH="386";; arm64) export GOARCH="arm64";; esac os="$(uname)" case "$os" in Linux) export GOOS="linux";; Darwin) export GOOS="darwin";; esac path_prepend $_GOROOT/bin if [ -d $GOPATH/bin ] ; then path_prepend $GOPATH/bin fi fi alias gotip=$HOME/src/go/bin/go # export GO111MODULE=on # export GOPROXY=direct # export GOSUMDB=off # Get all goroutine traces on panic, not just the crashing one. See # https://github.com/maruel/panicparse#gotraceback export GOTRACEBACK=all # always use local Go toolchain export GOTOOLCHAIN=local # vim:ft=zsh