Skip to content

Commit

Permalink
_content/doc/database: add missing err in fmt.Errorf call
Browse files Browse the repository at this point in the history
There's a %v in the format string, but the err variable wasn't included.

Fixes golang/go#65016

Change-Id: If073c0e79c9b376a7e43fded70db7669e72237ce
GitHub-Last-Rev: 14f8d91
GitHub-Pull-Request: #270
Reviewed-on: https://go-review.googlesource.com/c/website/+/555016
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
  • Loading branch information
denpeshkov authored and gopherbot committed Jan 11, 2024
1 parent 084ad90 commit 7567411
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _content/doc/database/querying.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func canPurchase(id int, quantity int) (bool, error) {
if err == sql.ErrNoRows {
return false, fmt.Errorf("canPurchase %d: unknown album", id)
}
return false, fmt.Errorf("canPurchase %d: %v", id)
return false, fmt.Errorf("canPurchase %d: %v", id, err)
}
return enough, nil
}
Expand Down

0 comments on commit 7567411

Please sign in to comment.