summaryrefslogtreecommitdiff
path: root/vendor/github.com/jackc/pgproto3
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/jackc/pgproto3')
-rw-r--r--vendor/github.com/jackc/pgproto3/v2/README.md6
-rw-r--r--vendor/github.com/jackc/pgproto3/v2/sasl_initial_response.go9
-rw-r--r--vendor/github.com/jackc/pgproto3/v2/sasl_response.go9
3 files changed, 8 insertions, 16 deletions
diff --git a/vendor/github.com/jackc/pgproto3/v2/README.md b/vendor/github.com/jackc/pgproto3/v2/README.md
index 565b3efd5..77a31700a 100644
--- a/vendor/github.com/jackc/pgproto3/v2/README.md
+++ b/vendor/github.com/jackc/pgproto3/v2/README.md
@@ -1,6 +1,12 @@
[![](https://godoc.org/github.com/jackc/pgproto3?status.svg)](https://godoc.org/github.com/jackc/pgproto3)
[![Build Status](https://travis-ci.org/jackc/pgproto3.svg)](https://travis-ci.org/jackc/pgproto3)
+---
+
+This version is used with pgx `v4`. In pgx `v5` it is part of the https://github.com/jackc/pgx repository.
+
+---
+
# pgproto3
Package pgproto3 is a encoder and decoder of the PostgreSQL wire protocol version 3.
diff --git a/vendor/github.com/jackc/pgproto3/v2/sasl_initial_response.go b/vendor/github.com/jackc/pgproto3/v2/sasl_initial_response.go
index f862f2a85..a6b553e72 100644
--- a/vendor/github.com/jackc/pgproto3/v2/sasl_initial_response.go
+++ b/vendor/github.com/jackc/pgproto3/v2/sasl_initial_response.go
@@ -2,7 +2,6 @@ package pgproto3
import (
"bytes"
- "encoding/hex"
"encoding/json"
"errors"
@@ -83,12 +82,6 @@ func (dst *SASLInitialResponse) UnmarshalJSON(data []byte) error {
return err
}
dst.AuthMechanism = msg.AuthMechanism
- if msg.Data != "" {
- decoded, err := hex.DecodeString(msg.Data)
- if err != nil {
- return err
- }
- dst.Data = decoded
- }
+ dst.Data = []byte(msg.Data)
return nil
}
diff --git a/vendor/github.com/jackc/pgproto3/v2/sasl_response.go b/vendor/github.com/jackc/pgproto3/v2/sasl_response.go
index d402759a5..d3e5d6a56 100644
--- a/vendor/github.com/jackc/pgproto3/v2/sasl_response.go
+++ b/vendor/github.com/jackc/pgproto3/v2/sasl_response.go
@@ -1,7 +1,6 @@
package pgproto3
import (
- "encoding/hex"
"encoding/json"
"github.com/jackc/pgio"
@@ -50,12 +49,6 @@ func (dst *SASLResponse) UnmarshalJSON(data []byte) error {
if err := json.Unmarshal(data, &msg); err != nil {
return err
}
- if msg.Data != "" {
- decoded, err := hex.DecodeString(msg.Data)
- if err != nil {
- return err
- }
- dst.Data = decoded
- }
+ dst.Data = []byte(msg.Data)
return nil
}