You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version queries like @v1.2 are handled by this code in cmd/go/internal/modload/query.go:
// matchSemverPrefix reports whether the shortened semantic version p
// matches the full-width (non-shortened) semantic version v.
func matchSemverPrefix(p, v string) bool {
return len(v) > len(p) && v[len(p)] == '.' && v[:len(p)] == p
}
matchSemverPrefix("v1.2", "v1.2.0-prerelease") is true but probably should be false, because semver.Compare("v1.2", "v1.2.0-prerelease") < 0.
Version queries like @v1.2 are handled by this code in cmd/go/internal/modload/query.go:
matchSemverPrefix("v1.2", "v1.2.0-prerelease") is true but probably should be false, because semver.Compare("v1.2", "v1.2.0-prerelease") < 0.
/cc @jayconrod @bcmills
The text was updated successfully, but these errors were encountered: