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

Method Encode

pgproto3/error_response.go:113–117  ·  view source on GitHub ↗

Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.

(dst []byte)

Source from the content-addressed store, hash-verified

111
112// Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
113func (src *ErrorResponse) Encode(dst []byte) ([]byte, error) {
114 dst, sp := beginMessage(dst, 'E')
115 dst = src.appendFields(dst)
116 return finishMessage(dst, sp)
117}
118
119func (src *ErrorResponse) appendFields(dst []byte) []byte {
120 if src.Severity != "" {

Callers

nothing calls this directly

Calls 3

appendFieldsMethod · 0.95
beginMessageFunction · 0.85
finishMessageFunction · 0.85

Tested by

no test coverage detected