Introduce pgproto3 package
pgproto3 will wrap the message encoding and decoding for the PostgreSQL frontend/backend protocol version 3.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package pgproto3
|
||||
|
||||
type NoticeResponse ErrorResponse
|
||||
|
||||
func (*NoticeResponse) Backend() {}
|
||||
|
||||
func (dst *NoticeResponse) UnmarshalBinary(src []byte) error {
|
||||
return (*ErrorResponse)(dst).UnmarshalBinary(src)
|
||||
}
|
||||
|
||||
func (src *NoticeResponse) MarshalBinary() ([]byte, error) {
|
||||
return (*ErrorResponse)(src).marshalBinary('N')
|
||||
}
|
||||
Reference in New Issue
Block a user