Support for the GOBIN environment variable for each Go version (#139)

Set `GOBIN`
This commit is contained in:
Piotr Kuglin 2024-08-20 23:54:27 +02:00 committed by GitHub
parent 0e86b1d5a7
commit 962a601cbd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -5,5 +5,6 @@ function asdf_update_golang_env --on-event fish_prompt
set -gx GOROOT (dirname (dirname "$full_path")) set -gx GOROOT (dirname (dirname "$full_path"))
set -gx GOPATH (dirname "$GOROOT")/packages set -gx GOPATH (dirname "$GOROOT")/packages
set -gx GOBIN (dirname "$GOROOT")/bin
end end
end end

View File

@ -7,6 +7,9 @@ asdf_update_golang_env() {
export GOPATH export GOPATH
GOPATH="$(dirname "${GOROOT:A}")/packages" GOPATH="$(dirname "${GOROOT:A}")/packages"
export GOBIN
GOBIN="$(dirname "${GOROOT:A}")/bin"
fi fi
} }