From 5cf3e34f96f0ea975e0ce5fb8a5f3b036a916500 Mon Sep 17 00:00:00 2001 From: Daniel Theophanes Date: Sat, 5 May 2018 07:18:21 -0700 Subject: 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 --- src/database/sql/sql.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/database/sql/sql.go') 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. -- cgit v1.3