dotfiles/.zsh.d/goenv.zsh

23 lines
449 B
Bash

# === go ===
case ${OSTYPE} in
darwin*)
# For Mac only
export GOPATH="$HOME/work/go"
export PATH="$GOPATH/bin:$PATH"
;;
linux*)
# for Linux Only
if [ -e ${HOME}/.goenv/bin/goenv ]; then
export GOENV_ROOT="$HOME/.goenv"
export GOPATH="$HOME/works/mnt/go"
export PATH="$GOENV_ROOT/bin:$GOPATH/bin:$PATH"
export GOENV_DISABLE_GOPATH=1
eval "$(goenv init -)"
export PATH="$GOROOT/bin:$PATH"
fi
esac