diff --git a/zsh/funcs/gopls b/zsh/funcs/gopls index 18fbb6b..c132363 100644 --- a/zsh/funcs/gopls +++ b/zsh/funcs/gopls @@ -1,12 +1,7 @@ if [[ $(whence -p go 2> /dev/null) ]]; then - local GO_BIN="$(go env GOPATH)/bin" - if [[ ! -d "${GO_BIN}" ]]; then - mkdir -p "${GO_BIN}" - fi - - if [[ ! -a "${GO_BIN}/gopls" ]]; then - pushd "${GO_BIN}" - GO111MODULE=on go get golang.org/x/tools/gopls@latest + if [[ ! $(whence -p gopls 2> /dev/null) ]]; then + pushd /tmp + go install golang.org/x/tools/gopls@latest popd fi -fi \ No newline at end of file +fi