aboutsummaryrefslogtreecommitdiff
path: root/src/database/sql/sql.go
diff options
context:
space:
mode:
authorKir Kolyshkin <kolyshkin@gmail.com>2022-09-06 17:48:26 -0700
committerGopher Robot <gobot@golang.org>2022-09-07 13:59:41 +0000
commit88149ed43e50325f3200b580be400c91ed01aaac (patch)
treeeb256d1c8a661cec32fd369ee49baf8c2b5ec0ec /src/database/sql/sql.go
parent5a9638692298deb45e7b95f51d5dd5a1be724874 (diff)
downloadgo-88149ed43e50325f3200b580be400c91ed01aaac.tar.xz
os: fix wrong error msg from TestReadClosed
If test would fail, the error message will have wrong error and its type, because e is used after the failed type assertion. To fix, use the original err. While at it, - combine the checks for error type and value into one statement; - use the standard "got ..., want ..." format. Fixes: 212d2f82e050 ("os: add ErrClosed, return for use of closed File") Change-Id: I862a96607b461ab89cce6bed2443b28aa2c16468 Reviewed-on: https://go-review.googlesource.com/c/go/+/428915 Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/database/sql/sql.go')
0 files changed, 0 insertions, 0 deletions