aboutsummaryrefslogtreecommitdiff
path: root/internal/postgres/insert_module.go
diff options
context:
space:
mode:
authorJulie Qiu <julie@golang.org>2020-11-18 20:11:08 -0500
committerJulie Qiu <julie@golang.org>2020-11-23 20:57:25 +0000
commitee99d756c7fbf5287935a947535ff3f41afced32 (patch)
treec79dd2fac69878b79b6288670cf4d9481aa30bcc /internal/postgres/insert_module.go
parent0d700958dad10202653972251ebf081bb8142c64 (diff)
downloadgo-x-pkgsite-ee99d756c7fbf5287935a947535ff3f41afced32.tar.xz
internal/postgres: use squirrel in GetUnitMeta
github.com/Masterminds/squirrel is now used to build the query for GetUnitMeta. For golang/go#42708 Change-Id: I91ce1c205739445e1bccfe9549d232b49337b999 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/271379 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
Diffstat (limited to 'internal/postgres/insert_module.go')
-rw-r--r--internal/postgres/insert_module.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/postgres/insert_module.go b/internal/postgres/insert_module.go
index eb422866..3c1502c7 100644
--- a/internal/postgres/insert_module.go
+++ b/internal/postgres/insert_module.go
@@ -507,7 +507,7 @@ func isLatestVersion(ctx context.Context, db *database.DB, modulePath, resolvedV
query := fmt.Sprintf(`
SELECT version FROM modules m WHERE m.module_path = $1
%s
- LIMIT 1`, orderByLatest)
+ LIMIT 1`, orderByLatestStmt)
row := db.QueryRow(ctx, query, modulePath)
var v string