internal/lsp/cache: fix release tag parsing

A copy and paste error meant that gopls iterated over the built-in
release tags rather than the ones read from go list. If gopls was built
with an older release than the go command in use, it would read past the
end of the slice and die.

Change-Id: Ifc222c7a0bd9662bcd7deedaa069797e213df7b3
Reviewed-on: https://go-review.googlesource.com/c/tools/+/255360
Trust: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
diff --git a/internal/lsp/cache/view.go b/internal/lsp/cache/view.go
index 91d537d..4ec760f 100644
--- a/internal/lsp/cache/view.go
+++ b/internal/lsp/cache/view.go
@@ -9,7 +9,6 @@
 	"context"
 	"encoding/json"
 	"fmt"
-	"go/build"
 	"io"
 	"io/ioutil"
 	"os"
@@ -1012,7 +1011,7 @@
 	tags := strings.Fields(stdout[1 : len(stdout)-2])
 	for i := len(tags) - 1; i >= 0; i-- {
 		var version int
-		if _, err := fmt.Sscanf(build.Default.ReleaseTags[i], "go1.%d", &version); err != nil {
+		if _, err := fmt.Sscanf(tags[i], "go1.%d", &version); err != nil {
 			continue
 		}
 		return version, nil