summaryrefslogtreecommitdiff
path: root/vendor/github.com/jackc/pgx/v5/pgproto3/authentication_ok.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/jackc/pgx/v5/pgproto3/authentication_ok.go')
-rw-r--r--vendor/github.com/jackc/pgx/v5/pgproto3/authentication_ok.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/vendor/github.com/jackc/pgx/v5/pgproto3/authentication_ok.go b/vendor/github.com/jackc/pgx/v5/pgproto3/authentication_ok.go
index 88d648ae7..ec11d39f1 100644
--- a/vendor/github.com/jackc/pgx/v5/pgproto3/authentication_ok.go
+++ b/vendor/github.com/jackc/pgx/v5/pgproto3/authentication_ok.go
@@ -35,11 +35,10 @@ func (dst *AuthenticationOk) Decode(src []byte) error {
}
// Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
-func (src *AuthenticationOk) Encode(dst []byte) []byte {
- dst = append(dst, 'R')
- dst = pgio.AppendInt32(dst, 8)
+func (src *AuthenticationOk) Encode(dst []byte) ([]byte, error) {
+ dst, sp := beginMessage(dst, 'R')
dst = pgio.AppendUint32(dst, AuthTypeOk)
- return dst
+ return finishMessage(dst, sp)
}
// MarshalJSON implements encoding/json.Marshaler.