fix gopls

This commit is contained in:
zendesk-acicchetti 2022-05-04 10:54:10 -04:00
parent 2103bdbd4a
commit ba4a044ba7

View file

@ -1,12 +1,7 @@
if [[ $(whence -p go 2> /dev/null) ]]; then if [[ $(whence -p go 2> /dev/null) ]]; then
local GO_BIN="$(go env GOPATH)/bin" if [[ ! $(whence -p gopls 2> /dev/null) ]]; then
if [[ ! -d "${GO_BIN}" ]]; then pushd /tmp
mkdir -p "${GO_BIN}" go install golang.org/x/tools/gopls@latest
fi
if [[ ! -a "${GO_BIN}/gopls" ]]; then
pushd "${GO_BIN}"
GO111MODULE=on go get golang.org/x/tools/gopls@latest
popd popd
fi fi
fi fi