pgx/pgproto3/notice_response.go
Jack Christensen 2e2c2ad778 Replace MarshalBinary with Encode
This new approach can avoid allocations.
2017-05-26 17:00:44 -05:00

14 lines
311 B
Go

package pgproto3
type NoticeResponse ErrorResponse
func (*NoticeResponse) Backend() {}
func (dst *NoticeResponse) Decode(src []byte) error {
return (*ErrorResponse)(dst).Decode(src)
}
func (src *NoticeResponse) Encode(dst []byte) []byte {
return append(dst, (*ErrorResponse)(src).marshalBinary('N')...)
}