diff options
author | Thomas Voss <mail@thomasvoss.com> | 2025-06-06 02:49:26 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2025-06-06 02:49:26 +0200 |
commit | 746a09a5854b9ce17e40caead51e1a42c2721bb1 (patch) | |
tree | 474d9a11c3b82196577b61333dffe3c94c5258fb /vendor/golang.org/x/tools/internal/versions/features.go | |
parent | efa0bd7df5f51d47c50efc446fd2f32996ab79be (diff) |
Unvendor dependencies
Diffstat (limited to 'vendor/golang.org/x/tools/internal/versions/features.go')
-rw-r--r-- | vendor/golang.org/x/tools/internal/versions/features.go | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/vendor/golang.org/x/tools/internal/versions/features.go b/vendor/golang.org/x/tools/internal/versions/features.go deleted file mode 100644 index b53f178..0000000 --- a/vendor/golang.org/x/tools/internal/versions/features.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2023 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package versions - -// This file contains predicates for working with file versions to -// decide when a tool should consider a language feature enabled. - -// GoVersions that features in x/tools can be gated to. -const ( - Go1_18 = "go1.18" - Go1_19 = "go1.19" - Go1_20 = "go1.20" - Go1_21 = "go1.21" - Go1_22 = "go1.22" -) - -// Future is an invalid unknown Go version sometime in the future. -// Do not use directly with Compare. -const Future = "" - -// AtLeast reports whether the file version v comes after a Go release. -// -// Use this predicate to enable a behavior once a certain Go release -// has happened (and stays enabled in the future). -func AtLeast(v, release string) bool { - if v == Future { - return true // an unknown future version is always after y. - } - return Compare(Lang(v), Lang(release)) >= 0 -} - -// Before reports whether the file version v is strictly before a Go release. -// -// Use this predicate to disable a behavior once a certain Go release -// has happened (and stays enabled in the future). -func Before(v, release string) bool { - if v == Future { - return false // an unknown future version happens after y. - } - return Compare(Lang(v), Lang(release)) < 0 -} |