database/sql: fix variable name in example

It's a very minor error, but it's a bad copy/paste example.

Change-Id: Ia6a723c31f2205c933857ce2cf715bddf773ebb6
GitHub-Last-Rev: 7f14b1a5c1
GitHub-Pull-Request: golang/go#37932
Reviewed-on: https://go-review.googlesource.com/c/go/+/223960
Reviewed-by: Daniel Theophanes <kardianos@gmail.com>
This commit is contained in:
Harmen 2020-03-18 17:52:57 +00:00 committed by Daniel Theophanes
parent 02057906f7
commit 019421d17f
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ func ExampleDB_QueryContext() {
// encounter an auto-commit error and be forced to rollback changes.
rerr := rows.Close()
if rerr != nil {
log.Fatal(err)
log.Fatal(rerr)
}
// Rows.Err will report the last error encountered by Rows.Scan.