mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-26 08:43:23 +00:00
Updates for go.mod
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
5
vendor/golang.org/x/tools/internal/versions/versions.go
generated
vendored
5
vendor/golang.org/x/tools/internal/versions/versions.go
generated
vendored
@ -4,6 +4,10 @@
|
||||
|
||||
package versions
|
||||
|
||||
import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// 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.
|
||||
@ -45,6 +49,7 @@ func IsValid(x string) bool { return isValid(stripGo(x)) }
|
||||
// stripGo converts from a "go1.21" version to a "1.21" version.
|
||||
// If v does not start with "go", stripGo returns the empty string (a known invalid version).
|
||||
func stripGo(v string) string {
|
||||
v, _, _ = strings.Cut(v, "-") // strip -bigcorp suffix.
|
||||
if len(v) < 2 || v[:2] != "go" {
|
||||
return ""
|
||||
}
|
||||
|
Reference in New Issue
Block a user