Skip to content

Commit 019421d

Browse files
alicebobkardianos
authored andcommitted
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: 7f14b1a GitHub-Pull-Request: #37932 Reviewed-on: https://go-review.googlesource.com/c/go/+/223960 Reviewed-by: Daniel Theophanes <kardianos@gmail.com>
1 parent 0205790 commit 019421d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/database/sql/example_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func ExampleDB_QueryContext() {
4141
// encounter an auto-commit error and be forced to rollback changes.
4242
rerr := rows.Close()
4343
if rerr != nil {
44-
log.Fatal(err)
44+
log.Fatal(rerr)
4545
}
4646

4747
// Rows.Err will report the last error encountered by Rows.Scan.

0 commit comments

Comments
 (0)