aboutsummaryrefslogtreecommitdiff
path: root/internal/postgres/package.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/postgres/package.go')
-rw-r--r--internal/postgres/package.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/postgres/package.go b/internal/postgres/package.go
index 803b45d8..8f1e310e 100644
--- a/internal/postgres/package.go
+++ b/internal/postgres/package.go
@@ -16,7 +16,7 @@ import (
"golang.org/x/pkgsite/internal/stdlib"
)
-// GetPackage returns the a package from the database with the corresponding
+// LegacyGetPackage returns the a package from the database with the corresponding
// pkgPath, modulePath and version.
//
// If version = internal.LatestVersion, the package corresponding to
@@ -41,8 +41,8 @@ import (
// The returned error may be checked with
// errors.Is(err, derrors.InvalidArgument) to determine if it was caused by an
// invalid path or version.
-func (db *DB) GetPackage(ctx context.Context, pkgPath, modulePath, version string) (_ *internal.LegacyVersionedPackage, err error) {
- defer derrors.Wrap(&err, "DB.GetPackage(ctx, %q, %q)", pkgPath, version)
+func (db *DB) LegacyGetPackage(ctx context.Context, pkgPath, modulePath, version string) (_ *internal.LegacyVersionedPackage, err error) {
+ defer derrors.Wrap(&err, "DB.LegacyGetPackage(ctx, %q, %q)", pkgPath, version)
if pkgPath == "" || modulePath == "" || version == "" {
return nil, fmt.Errorf("none of pkgPath, modulePath, or version can be empty: %w", derrors.InvalidArgument)
}