diff options
| author | junjunjunk <juntrp0207@gmail.com> | 2021-05-06 13:28:09 +0000 |
|---|---|---|
| committer | Jonathan Amsterdam <jba@google.com> | 2021-05-06 15:39:52 +0000 |
| commit | ab4eaf3df70292d1ae00eb8df3230e60fbd41879 (patch) | |
| tree | 49ea4599a4cb58a53ba88f484755dd2b5c1c3b1a /internal/postgres/insert_module.go | |
| parent | 9952931af08b52b06549fb197171cd86b42ba17b (diff) | |
| download | go-x-pkgsite-ab4eaf3df70292d1ae00eb8df3230e60fbd41879.tar.xz | |
internal/postgres: use moduleID in getPackagesInUnit
Add argument moduleID to getPackagesInUnit for more efficiency.
Fixes golang/go#45854
Change-Id: Ib8c7721ae5991704c28f966c6750f17289442dc8
GitHub-Last-Rev: 4986eff55818bfacfeddcc8300d563aa12594187
GitHub-Pull-Request: golang/pkgsite#27
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/315489
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
Diffstat (limited to 'internal/postgres/insert_module.go')
| -rw-r--r-- | internal/postgres/insert_module.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/postgres/insert_module.go b/internal/postgres/insert_module.go index 3857d6ac..89ce8354 100644 --- a/internal/postgres/insert_module.go +++ b/internal/postgres/insert_module.go @@ -686,7 +686,7 @@ func (db *DB) ReInsertLatestVersion(ctx context.Context, modulePath string) (err // Not an alternative module path. Read the module information at the // latest good version. - pkgMetas, err := getPackagesInUnit(ctx, tx, modulePath, modulePath, lmv.GoodVersion, db.bypassLicenseCheck) + pkgMetas, err := getPackagesInUnit(ctx, tx, modulePath, modulePath, lmv.GoodVersion, -1, db.bypassLicenseCheck) if err != nil { return err } |
