-
-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for the GOBIN environment variable for each Go version. #107
Comments
@BorzdeG Kindly try out this goenv: https://github.com/ankitcharolia/goenv |
@ankitcharolia Why install something else when it can be solved with one utility? |
I feel like modifying the asdf_update_golang_env() {
local go_path
go_path="$(asdf which go)"
if [[ -n "${go_path}" ]]; then
export GOROOT
GOROOT="$(dirname "$(dirname "${go_path:A}")")"
# the next two lines should be added to the original script
export GOBIN
GOBIN="$(dirname "$(dirname "${go_path:A}")")/bin"
fi
}
autoload -U add-zsh-hook
add-zsh-hook precmd asdf_update_golang_env This modification worked for me. Please let me know your thoughts! |
@lothar1998 this is what I was just about to do, but wanted to see what others were doing or if I was the only one with this issue. I ran |
By default, if
GOBIN
is not set, it is not guaranteed that the path$GOPATH/bin
will be used - it is better to set it explicitly in the EnvironmentThe text was updated successfully, but these errors were encountered: