diff options
Diffstat (limited to 'internal/postgres/insert_module.go')
| -rw-r--r-- | internal/postgres/insert_module.go | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/internal/postgres/insert_module.go b/internal/postgres/insert_module.go index 8d68bece..1d979a84 100644 --- a/internal/postgres/insert_module.go +++ b/internal/postgres/insert_module.go @@ -205,7 +205,7 @@ func insertModule(ctx context.Context, db *database.DB, m *internal.Module) (_ i m.IsRedistributable, m.HasGoMod, m.DeprecatedComment, - isIncompatible(m.Version), + version.IsIncompatible(m.Version), ).Scan(&moduleID) if err != nil { return 0, err @@ -581,12 +581,6 @@ func lock(ctx context.Context, tx *database.DB, modulePath string) (err error) { return nil } -// isIncompatible reports whether the build metadata of the version is -// "+incompatible", https://semver.org clause 10. -func isIncompatible(version string) bool { - return strings.HasSuffix(version, "+incompatible") -} - // isLatestVersion reports whether version is the latest version of the module. func isLatestVersion(ctx context.Context, ddb *database.DB, modulePath, resolvedVersion string) (_ bool, err error) { defer derrors.WrapStack(&err, "isLatestVersion(ctx, tx, %q)", modulePath) |
