aboutsummaryrefslogtreecommitdiff
path: root/internal/postgres/postgres.go
diff options
context:
space:
mode:
authorJonathan Amsterdam <jba@google.com>2024-02-21 14:53:19 -0500
committerJonathan Amsterdam <jba@google.com>2024-02-21 20:50:14 +0000
commit463d7c943fe04a6c6f2b97e71def0fb165fff76a (patch)
tree3cd58f3494173c4ebfaadebb2540a4dd92fddee9 /internal/postgres/postgres.go
parent375600cd10f6571ba115242bafe8131f503609e0 (diff)
downloadgo-x-pkgsite-463d7c943fe04a6c6f2b97e71def0fb165fff76a.tar.xz
internal/postgres: support module@version exclusions
Allow a specific module@version to be excluded. Previously, only entire module paths or path prefixes (at every version) could be excluded. This will allow us to exclude specific versions that we can't process, because they are too large for instance. A necessary part of the change is adding a version argument to the IsExcluded method. While we are there, we drop the error return value, since it's always nil. Change-Id: I68fd1c8f66ee654e56bd7dcf230a88959b32bbc8 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/565815 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Matloob <matloob@golang.org> Run-TryBot: Jonathan Amsterdam <jba@google.com> kokoro-CI: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'internal/postgres/postgres.go')
-rw-r--r--internal/postgres/postgres.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/postgres/postgres.go b/internal/postgres/postgres.go
index d56f08c6..5498b9d7 100644
--- a/internal/postgres/postgres.go
+++ b/internal/postgres/postgres.go
@@ -43,7 +43,7 @@ func newdb(db *database.DB, bypass bool) *DB {
p := poller.New(
[]string(nil),
func(ctx context.Context) (any, error) {
- return getExcludedPrefixes(ctx, db)
+ return getExcludedPatterns(ctx, db)
},
func(err error) {
log.Errorf(context.Background(), "getting excluded prefixes: %v", err)