2
0

Use github.com/pkg/errors

This commit is contained in:
Jack Christensen
2017-06-04 21:30:03 -05:00
parent 8e404a02a3
commit ffa9ff2213
4 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -2,10 +2,10 @@ package pgproto3
import (
"encoding/binary"
"fmt"
"io"
"github.com/jackc/pgx/chunkreader"
"github.com/pkg/errors"
)
type Backend struct {
@@ -88,7 +88,7 @@ func (b *Backend) Receive() (FrontendMessage, error) {
case 'X':
msg = &b.terminate
default:
return nil, fmt.Errorf("unknown message type: %c", msgType)
return nil, errors.Errorf("unknown message type: %c", msgType)
}
msgBody, err := b.cr.Next(bodyLen)