go/src/database/sql
aimuz d8311c8623 database/sql: wrap errors with %w in driverArgsConnLocked
Use fmt.Errorf %w verb to wrap errors in driverArgsConnLocked,
which allows for easier unwrapping and checking of error types.

Add tests in sql_test.go to ensure that Stmt.Exec and Stmt.Query
correctly wrap underlying Valuer errors, adhering to the new change.

Fixes #64707.

Change-Id: Id9f80e265735d0849ee7abba63e58e4c26e658ad
GitHub-Last-Rev: 0df367e0fb
GitHub-Pull-Request: golang/go#64728
Reviewed-on: https://go-review.googlesource.com/c/go/+/550116
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-02-27 16:30:20 +00:00
..
driver database/sql: wrap errors with %w in driverArgsConnLocked 2024-02-27 16:30:20 +00:00
convert.go database/sql: wrap errors with %w in driverArgsConnLocked 2024-02-27 16:30:20 +00:00
convert_test.go all: gofmt -w -r 'interface{} -> any' src 2021-12-13 18:45:54 +00:00
ctxutil.go
doc.txt
example_cli_test.go all: fix some lint issues 2022-05-08 17:27:54 +00:00
example_service_test.go
example_test.go database/sql: fix incorrect function name in example_test 2020-04-28 14:05:09 +00:00
fakedb_test.go database/sql: use reflect.TypeFor for known types 2023-08-08 20:57:57 +00:00
sql.go all: fix field names 2023-11-27 15:48:25 +00:00
sql_test.go database/sql: wrap errors with %w in driverArgsConnLocked 2024-02-27 16:30:20 +00:00