aboutsummaryrefslogtreecommitdiff
path: root/internal/postgres/versionstate.go
diff options
context:
space:
mode:
authorRob Findley <rfindley@google.com>2019-08-06 14:38:30 -0400
committerJulie Qiu <julie@golang.org>2020-03-27 16:46:41 -0400
commit0159400f6a7066c4b488cb6edb77cc967da0b417 (patch)
tree7ced14b7a4e5853fe0d315b9c770886a33deb6d6 /internal/postgres/versionstate.go
parentc1de446b43fdfdc0676266cb55f942bd6dd17af2 (diff)
downloadgo-x-pkgsite-0159400f6a7066c4b488cb6edb77cc967da0b417.tar.xz
internal/derrors: switch to using xerrors
The derrors package is reduced to a set of error values and the helper method FromHTTPStatus, by using the xerrors package. Change-Id: Ifdcec6abe7e14f127c20afa1f7e9ab1521272806 Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/521329 Reviewed-by: Jonathan Amsterdam <jba@google.com>
Diffstat (limited to 'internal/postgres/versionstate.go')
-rw-r--r--internal/postgres/versionstate.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/postgres/versionstate.go b/internal/postgres/versionstate.go
index 5d4741e6..60df582c 100644
--- a/internal/postgres/versionstate.go
+++ b/internal/postgres/versionstate.go
@@ -250,7 +250,7 @@ func (db *DB) GetVersionState(ctx context.Context, modulePath, version string) (
case nil:
return v, nil
case sql.ErrNoRows:
- return nil, derrors.NotFound("version not found")
+ return nil, derrors.NotFound
default:
return nil, fmt.Errorf("row.Scan(): %v", err)
}