2
0

Use golang.org/x/xerrors

This commit is contained in:
Jack Christensen
2019-04-20 17:43:44 -05:00
parent efb333df6b
commit cc3461e65d
79 changed files with 79 additions and 79 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"github.com/jackc/pgconn" "github.com/jackc/pgconn"
"github.com/jackc/pgx/v4/pgtype" "github.com/jackc/pgx/v4/pgtype"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type batchItem struct { type batchItem struct {
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
"github.com/jackc/pgconn" "github.com/jackc/pgconn"
"github.com/jackc/pgproto3/v2" "github.com/jackc/pgproto3/v2"
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"io" "io"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
// CopyFromRows returns a CopyFromSource interface over the provided rows slice // CopyFromRows returns a CopyFromSource interface over the provided rows slice
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"github.com/jackc/pgconn" "github.com/jackc/pgconn"
"github.com/jackc/pgx/v4" "github.com/jackc/pgx/v4"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
func TestConnCopyFromSmall(t *testing.T) { func TestConnCopyFromSmall(t *testing.T) {
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"github.com/jackc/pgx/v4" "github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v4/pgtype" "github.com/jackc/pgx/v4/pgtype"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
var pointRegexp *regexp.Regexp = regexp.MustCompile(`^\((.*),(.*)\)$`) var pointRegexp *regexp.Regexp = regexp.MustCompile(`^\((.*),(.*)\)$`)
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"encoding/hex" "encoding/hex"
"fmt" "fmt"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
// The values for log levels are chosen such that the zero value means that no // The values for log levels are chosen such that the zero value means that no
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"net" "net"
"reflect" "reflect"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
"github.com/jackc/pgproto3/v2" "github.com/jackc/pgproto3/v2"
"github.com/jackc/pgx/v4/pgtype" "github.com/jackc/pgx/v4/pgtype"
+1 -1
View File
@@ -3,7 +3,7 @@ package pgtype
import ( import (
"database/sql/driver" "database/sql/driver"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
// ACLItem is used for PostgreSQL's aclitem data type. A sample aclitem // ACLItem is used for PostgreSQL's aclitem data type. A sample aclitem
+1 -1
View File
@@ -3,7 +3,7 @@ package pgtype
import ( import (
"database/sql/driver" "database/sql/driver"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type ACLItemArray struct { type ACLItemArray struct {
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"unicode" "unicode"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
// Information on the internals of PostgreSQL arrays can be found in // Information on the internals of PostgreSQL arrays can be found in
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"database/sql/driver" "database/sql/driver"
"strconv" "strconv"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type Bool struct { type Bool struct {
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"encoding/binary" "encoding/binary"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type BoolArray struct { type BoolArray struct {
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"strings" "strings"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type Box struct { type Box struct {
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"encoding/binary" "encoding/binary"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type BPCharArray struct { type BPCharArray struct {
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"database/sql/driver" "database/sql/driver"
"encoding/hex" "encoding/hex"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type Bytea struct { type Bytea struct {
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"encoding/binary" "encoding/binary"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type ByteaArray struct { type ByteaArray struct {
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"net" "net"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type CIDRArray struct { type CIDRArray struct {
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"strings" "strings"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type Circle struct { type Circle struct {
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"reflect" "reflect"
"time" "time"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
const maxUint = ^uint(0) const maxUint = ^uint(0)
+1 -1
View File
@@ -3,7 +3,7 @@ package pgtype
import ( import (
"database/sql/driver" "database/sql/driver"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
func DatabaseSQLValue(ci *ConnInfo, src Value) (interface{}, error) { func DatabaseSQLValue(ci *ConnInfo, src Value) (interface{}, error) {
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"time" "time"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type Date struct { type Date struct {
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"time" "time"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type DateArray struct { type DateArray struct {
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"database/sql/driver" "database/sql/driver"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type Daterange struct { type Daterange struct {
+1 -1
View File
@@ -3,7 +3,7 @@ package pgtype
import ( import (
"database/sql/driver" "database/sql/driver"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type EnumArray struct { type EnumArray struct {
+1 -1
View File
@@ -3,7 +3,7 @@ package uuid
import ( import (
"database/sql/driver" "database/sql/driver"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
"github.com/jackc/pgx/v4/pgtype" "github.com/jackc/pgx/v4/pgtype"
uuid "github.com/satori/go.uuid" uuid "github.com/satori/go.uuid"
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"database/sql/driver" "database/sql/driver"
"strconv" "strconv"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
"github.com/jackc/pgx/v4/pgtype" "github.com/jackc/pgx/v4/pgtype"
"github.com/shopspring/decimal" "github.com/shopspring/decimal"
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"strconv" "strconv"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type Float4 struct { type Float4 struct {
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"encoding/binary" "encoding/binary"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type Float4Array struct { type Float4Array struct {
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"strconv" "strconv"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type Float8 struct { type Float8 struct {
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"encoding/binary" "encoding/binary"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type Float8Array struct { type Float8Array struct {
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"unicode" "unicode"
"unicode/utf8" "unicode/utf8"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
"github.com/jackc/pgio" "github.com/jackc/pgio"
) )
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"encoding/binary" "encoding/binary"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type HstoreArray struct { type HstoreArray struct {
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"database/sql/driver" "database/sql/driver"
"net" "net"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
// Network address family is dependent on server socket.h value for AF_INET. // Network address family is dependent on server socket.h value for AF_INET.
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"net" "net"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type InetArray struct { type InetArray struct {
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"strconv" "strconv"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type Int2 struct { type Int2 struct {
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"encoding/binary" "encoding/binary"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type Int2Array struct { type Int2Array struct {
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"strconv" "strconv"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type Int4 struct { type Int4 struct {
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"encoding/binary" "encoding/binary"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type Int4Array struct { type Int4Array struct {
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"database/sql/driver" "database/sql/driver"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type Int4range struct { type Int4range struct {
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"strconv" "strconv"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type Int8 struct { type Int8 struct {
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"encoding/binary" "encoding/binary"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type Int8Array struct { type Int8Array struct {
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"database/sql/driver" "database/sql/driver"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type Int8range struct { type Int8range struct {
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"time" "time"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
const ( const (
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"database/sql/driver" "database/sql/driver"
"encoding/json" "encoding/json"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type JSON struct { type JSON struct {
+1 -1
View File
@@ -3,7 +3,7 @@ package pgtype
import ( import (
"database/sql/driver" "database/sql/driver"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type JSONB JSON type JSONB JSON
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"strings" "strings"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type Line struct { type Line struct {
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"strings" "strings"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type Lseg struct { type Lseg struct {
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"database/sql/driver" "database/sql/driver"
"net" "net"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type Macaddr struct { type Macaddr struct {
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"net" "net"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type MacaddrArray struct { type MacaddrArray struct {
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"strings" "strings"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
// PostgreSQL internal numeric storage uses 16-bit "digits" with base of 10,000 // PostgreSQL internal numeric storage uses 16-bit "digits" with base of 10,000
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"encoding/binary" "encoding/binary"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type NumericArray struct { type NumericArray struct {
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"database/sql/driver" "database/sql/driver"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type Numrange struct { type Numrange struct {
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"strconv" "strconv"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
// OID (Object Identifier Type) is, according to // OID (Object Identifier Type) is, according to
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"strings" "strings"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type Path struct { type Path struct {
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"database/sql" "database/sql"
"reflect" "reflect"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
// PostgreSQL oids for common types // PostgreSQL oids for common types
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"strconv" "strconv"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
// pguint32 is the core type that is used to implement PostgreSQL types such as // pguint32 is the core type that is used to implement PostgreSQL types such as
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"strings" "strings"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type Vec2 struct { type Vec2 struct {
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"strings" "strings"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type Polygon struct { type Polygon struct {
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"math" "math"
"strconv" "strconv"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
// QChar is for PostgreSQL's special 8-bit-only "char" type more akin to the C // QChar is for PostgreSQL's special 8-bit-only "char" type more akin to the C
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"bytes" "bytes"
"encoding/binary" "encoding/binary"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type BoundType byte type BoundType byte
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"encoding/binary" "encoding/binary"
"reflect" "reflect"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
// Record is the generic PostgreSQL record type such as is created with the // Record is the generic PostgreSQL record type such as is created with the
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"database/sql/driver" "database/sql/driver"
"encoding/json" "encoding/json"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type Text struct { type Text struct {
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"encoding/binary" "encoding/binary"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type TextArray struct { type TextArray struct {
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"strings" "strings"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
// TID is PostgreSQL's Tuple Identifier type. // TID is PostgreSQL's Tuple Identifier type.
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"time" "time"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
const pgTimestampFormat = "2006-01-02 15:04:05.999999999" const pgTimestampFormat = "2006-01-02 15:04:05.999999999"
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"time" "time"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type TimestampArray struct { type TimestampArray struct {
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"time" "time"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
const pgTimestamptzHourFormat = "2006-01-02 15:04:05.999999999Z07" const pgTimestamptzHourFormat = "2006-01-02 15:04:05.999999999Z07"
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"time" "time"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type TimestamptzArray struct { type TimestamptzArray struct {
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"database/sql/driver" "database/sql/driver"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type Tsrange struct { type Tsrange struct {
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"database/sql/driver" "database/sql/driver"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type Tstzrange struct { type Tstzrange struct {
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"encoding/hex" "encoding/hex"
"fmt" "fmt"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type UUID struct { type UUID struct {
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"encoding/binary" "encoding/binary"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type UUIDArray struct { type UUIDArray struct {
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"encoding/binary" "encoding/binary"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type Varbit struct { type Varbit struct {
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"encoding/binary" "encoding/binary"
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type VarcharArray struct { type VarcharArray struct {
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"reflect" "reflect"
"time" "time"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
"github.com/jackc/pgconn" "github.com/jackc/pgconn"
"github.com/jackc/pgx/v4/pgtype" "github.com/jackc/pgx/v4/pgtype"
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
"github.com/jackc/pgconn" "github.com/jackc/pgconn"
"github.com/jackc/pgio" "github.com/jackc/pgio"
+1 -1
View File
@@ -9,7 +9,7 @@ package pgx_test
// "testing" // "testing"
// "time" // "time"
// "github.com/pkg/errors" // errors "golang.org/x/xerrors"
// "github.com/jackc/fake" // "github.com/jackc/fake"
// "github.com/jackc/pgx/v4" // "github.com/jackc/pgx/v4"
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"fmt" "fmt"
"github.com/jackc/pgconn" "github.com/jackc/pgconn"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
type TxIsoLevel string type TxIsoLevel string
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"github.com/jackc/pgio" "github.com/jackc/pgio"
"github.com/jackc/pgx/v4/pgtype" "github.com/jackc/pgx/v4/pgtype"
"github.com/pkg/errors" errors "golang.org/x/xerrors"
) )
// PostgreSQL format codes // PostgreSQL format codes