aboutsummaryrefslogtreecommitdiff
path: root/src/database/sql/sql.go
diff options
context:
space:
mode:
authorDaniel Theophanes <kardianos@gmail.com>2018-05-05 07:18:21 -0700
committerDaniel Theophanes <kardianos@gmail.com>2018-05-05 16:27:20 +0000
commit5cf3e34f96f0ea975e0ce5fb8a5f3b036a916500 (patch)
tree06539e566da06c857629b866bbbc1ef94851fd15 /src/database/sql/sql.go
parentf7c767edc52e0989b58083c43241a1f21d82915f (diff)
downloadgo-5cf3e34f96f0ea975e0ce5fb8a5f3b036a916500.tar.xz
database/sql: make error prefixes consistent
Ensure all error prefixes in the "database/sql" package start with "sql: ". Do not prefix errors for type conversions because they are always embedded in another error message with a specific context. Fixes #25251 Change-Id: I349d9804f3bfda4eeb755b32b508ec5992c28e07 Reviewed-on: https://go-review.googlesource.com/111637 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/database/sql/sql.go')
-rw-r--r--src/database/sql/sql.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/database/sql/sql.go b/src/database/sql/sql.go
index 1038bb659a..ec7b526150 100644
--- a/src/database/sql/sql.go
+++ b/src/database/sql/sql.go
@@ -1631,7 +1631,7 @@ func (db *DB) Driver() driver.Driver {
// ErrConnDone is returned by any operation that is performed on a connection
// that has already been returned to the connection pool.
-var ErrConnDone = errors.New("database/sql: connection is already closed")
+var ErrConnDone = errors.New("sql: connection is already closed")
// Conn returns a single connection by either opening a new connection
// or returning an existing connection from the connection pool. Conn will
@@ -1879,7 +1879,7 @@ func (tx *Tx) isDone() bool {
// ErrTxDone is returned by any operation that is performed on a transaction
// that has already been committed or rolled back.
-var ErrTxDone = errors.New("sql: Transaction has already been committed or rolled back")
+var ErrTxDone = errors.New("sql: transaction has already been committed or rolled back")
// close returns the connection to the pool and
// must only be called by Tx.rollback or Tx.Commit.