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
+3 -3
View File
@@ -2,6 +2,7 @@ package pgx_test
import (
"context"
"fmt"
"os"
"reflect"
"testing"
@@ -10,7 +11,6 @@ import (
"github.com/jackc/pgconn"
"github.com/jackc/pgx/v4"
"github.com/stretchr/testify/require"
errors "golang.org/x/xerrors"
)
func TestConnCopyFromSmall(t *testing.T) {
@@ -316,7 +316,7 @@ func (cfs *clientFailSource) Next() bool {
func (cfs *clientFailSource) Values() ([]interface{}, error) {
if cfs.count == 3 {
cfs.err = errors.Errorf("client error")
cfs.err = fmt.Errorf("client error")
return nil, cfs.err
}
return []interface{}{make([]byte, 100000)}, nil
@@ -559,7 +559,7 @@ func (cfs *clientFinalErrSource) Values() ([]interface{}, error) {
}
func (cfs *clientFinalErrSource) Err() error {
return errors.Errorf("final error")
return fmt.Errorf("final error")
}
func TestConnCopyFromCopyFromSourceErrorEnd(t *testing.T) {