MCPcopy
hub / github.com/jackc/pgx / Encode

Method Encode

pgproto3/ssl_request.go:33–37  ·  view source on GitHub ↗

Encode encodes src into dst. dst will include the 4 byte message length.

(dst []byte)

Source from the content-addressed store, hash-verified

31
32// Encode encodes src into dst. dst will include the 4 byte message length.
33func (src *SSLRequest) Encode(dst []byte) ([]byte, error) {
34 dst = pgio.AppendInt32(dst, 8)
35 dst = pgio.AppendInt32(dst, sslRequestNumber)
36 return dst, nil
37}
38
39// MarshalJSON implements encoding/json.Marshaler.
40func (src SSLRequest) MarshalJSON() ([]byte, error) {

Callers

nothing calls this directly

Calls 1

AppendInt32Function · 0.92

Tested by

no test coverage detected