added a checker for .goenv directory

This commit is contained in:
Wes Key
2021-12-14 20:33:58 -05:00
committed by Koichi Murase
parent 35184a8e41
commit 4f4fd5df8c

View File

@@ -1,12 +1,14 @@
# @chopnico 2021
# goenv exported variables
export GOENV_ROOT="$HOME/.goenv"
export PATH="$GOENV_ROOT/bin:$PATH"
if [ -d "$HOME/.goenv" ]; then
# goenv exported variables
export GOENV_ROOT="$HOME/.goenv"
export PATH="$GOENV_ROOT/bin:$PATH"
# Enables goenv shims
eval "$(goenv init -)"
# Enables goenv shims
eval "$(goenv init -)"
# Allows goenv to manage GOPATH and GOROOT
export PATH="$GOROOT/bin:$PATH"
export PATH="$PATH:$GOPATH/bin"
# Allows goenv to manage GOPATH and GOROOT
export PATH="$GOROOT/bin:$PATH"
export PATH="$PATH:$GOPATH/bin"
fi