From 7567411c773b6b785d4476b5a7a9c1f02d7ce159 Mon Sep 17 00:00:00 2001 From: Denis Peshkov Date: Wed, 10 Jan 2024 15:56:03 +0000 Subject: [PATCH] _content/doc/database: add missing err in fmt.Errorf call 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: 14f8d91f4c8f68192a2981e0ebe8115c6ddc2905 GitHub-Pull-Request: golang/website#270 Reviewed-on: https://go-review.googlesource.com/c/website/+/555016 Reviewed-by: Dmitri Shuralyov Auto-Submit: Dmitri Shuralyov Reviewed-by: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI Reviewed-by: Hyang-Ah Hana Kim --- _content/doc/database/querying.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_content/doc/database/querying.md b/_content/doc/database/querying.md index c36bea6bb6..0d6035a3ca 100644 --- a/_content/doc/database/querying.md +++ b/_content/doc/database/querying.md @@ -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 }