diff options
| author | Daniel Theophanes <kardianos@gmail.com> | 2020-03-18 10:03:51 -0700 |
|---|---|---|
| committer | Daniel Theophanes <kardianos@gmail.com> | 2020-03-29 02:01:34 +0000 |
| commit | 5aef51a729f428bfd4b2c28fd2ba7950660608e0 (patch) | |
| tree | b54659cae5f7ff946328b2bb9d2bb200b2f8d1ae /src/database/sql/sql.go | |
| parent | 2ba00e47545406b3dd11436e3f1acf841d4932c6 (diff) | |
| download | go-5aef51a729f428bfd4b2c28fd2ba7950660608e0.tar.xz | |
database/sql: add test for Conn.Validator interface
This addresses comments made by Russ after
https://golang.org/cl/174122 was merged. It addes a test
for the connection validator and renames the interface to just
"Validator".
Change-Id: Iea53e9b250c9be2e86e9b75906e7353e26437c5c
Reviewed-on: https://go-review.googlesource.com/c/go/+/223963
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Diffstat (limited to 'src/database/sql/sql.go')
| -rw-r--r-- | src/database/sql/sql.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/database/sql/sql.go b/src/database/sql/sql.go index 95906b1318..4093ffe1bb 100644 --- a/src/database/sql/sql.go +++ b/src/database/sql/sql.go @@ -512,8 +512,8 @@ func (dc *driverConn) validateConnection(needsReset bool) bool { if needsReset { dc.needReset = true } - if cv, ok := dc.ci.(driver.ConnectionValidator); ok { - return cv.ValidConnection() + if cv, ok := dc.ci.(driver.Validator); ok { + return cv.IsValid() } return true } |
