From 4a320500cf14b3775ff62b51a79051a9147064ad Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Tue, 27 Aug 2019 18:31:54 -0500 Subject: [PATCH] Remove barely used ProtocolError type --- conn.go | 7 ------- rows.go | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/conn.go b/conn.go index d7307a44..0e72db21 100644 --- a/conn.go +++ b/conn.go @@ -89,13 +89,6 @@ var ErrNoRows = errors.New("no rows in result set") // ErrInvalidLogLevel occurs on attempt to set an invalid log level. var ErrInvalidLogLevel = errors.New("invalid log level") -// ProtocolError occurs when unexpected data is received from PostgreSQL -type ProtocolError string - -func (e ProtocolError) Error() string { - return string(e) -} - // Connect establishes a connection with a PostgreSQL server with a connection string. See // pgconn.Connect for details. func Connect(ctx context.Context, connString string) (*Conn, error) { diff --git a/rows.go b/rows.go index ce100e97..7da3605e 100644 --- a/rows.go +++ b/rows.go @@ -165,7 +165,7 @@ func (rows *connRows) nextColumn() ([]byte, *pgproto3.FieldDescription, bool) { return nil, nil, false } if len(rows.FieldDescriptions()) <= rows.columnIdx { - rows.fatal(ProtocolError("No next column available")) + rows.fatal(errors.New("No next column available")) return nil, nil, false }