Skip to content

Commit

Permalink
internal/versions: remove use of go/versions
Browse files Browse the repository at this point in the history
Removes the guarded use of "go/versions" when on GoVersions >=1.22.
Instead always uses the internal fork.

Fixes golang/go#64490
Updates golang/go#32345

Change-Id: I22636c52ddbb89c72edbd0ed65ab6b9a394d70d1
Reviewed-on: https://go-review.googlesource.com/c/tools/+/550395
Reviewed-by: Bryan Mills <bcmills@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Run-TryBot: Tim King <taking@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
  • Loading branch information
timothy-king committed Dec 18, 2023
1 parent 261fa1a commit 83bceaf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build !go1.22
// +build !go1.22

package versions

// Note: If we use build tags to use go/versions when go >=1.22,
// we run into go.dev/issue/53737. Under some operations users would see an
// import of "go/versions" even if they would not compile the file.
// For example, during `go get -u ./...` (go.dev/issue/64490) we do not try to include
// For this reason, this library just a clone of go/versions for the moment.

// Lang returns the Go language version for version x.
// If x is not a valid version, Lang returns the empty string.
// For example:
Expand Down
38 changes: 0 additions & 38 deletions internal/versions/versions_go122.go

This file was deleted.

0 comments on commit 83bceaf

Please sign in to comment.