2
0

Use errors instead of golang.org/x/xerrors

This commit is contained in:
Jack Christensen
2021-03-25 09:55:12 -04:00
parent 80147fd7cc
commit a49f4bb135
15 changed files with 47 additions and 56 deletions
+2 -2
View File
@@ -3,11 +3,11 @@ package pgx
import (
"bytes"
"context"
"errors"
"fmt"
"strconv"
"github.com/jackc/pgconn"
errors "golang.org/x/xerrors"
)
type TxIsoLevel string
@@ -246,7 +246,7 @@ func (tx *dbTx) Rollback(ctx context.Context) error {
tx.closed = true
if err != nil {
// A rollback failure leaves the connection in an undefined state
tx.conn.die(errors.Errorf("rollback failed: %w", err))
tx.conn.die(fmt.Errorf("rollback failed: %w", err))
return err
}