Skip to content

Commit

Permalink
update to use goenv
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-eraigosa committed Apr 2, 2024
1 parent 8eab687 commit d55a7cf
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions opt/profiles/.goenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,15 @@ if [[ "$(uname -r | awk -F'-' '{print $3}')" = "Microsoft" ]] ; then
alias go='go.exe'
fi

# requires brew install goenv
goenv install latest --skip-existing
eval "$(goenv init -)"

goenv shell $(goenv versions --bare|tail -1)
go version

# export GOENV_ROOT="$HOME/.goenv"
export PATH=$GOENV_ROOT/bin:$PATH
eval "$(go env init -)"
export PATH="$GOROOT/bin:$PATH"
export PATH="$PATH:$GOPATH/bin"
#export PATH=$GOENV_ROOT/bin:$PATH
#eval "$(go env init -)"
#export PATH="$GOROOT/bin:$PATH"
#export PATH="$PATH:$GOPATH/bin"

0 comments on commit d55a7cf

Please sign in to comment.