From 72dd37f1abb2b550aaaac48eac677403d5664797 Mon Sep 17 00:00:00 2001 From: Jeff Halter <868228+jhalter@users.noreply.github.com> Date: Tue, 10 Aug 2021 18:52:46 -0700 Subject: Add tests and clean up --- hotline/transaction.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hotline/transaction.go') diff --git a/hotline/transaction.go b/hotline/transaction.go index 8fbdf35..835d194 100644 --- a/hotline/transaction.go +++ b/hotline/transaction.go @@ -214,7 +214,7 @@ func ReadFields(paramCount []byte, buf []byte) ([]Field, error) { return fields, nil } -func (t Transaction) Payload() []byte { +func (t Transaction) MarshalBinary() (data []byte, err error) { payloadSize := t.Size() fieldCount := make([]byte, 2) @@ -234,7 +234,7 @@ func (t Transaction) Payload() []byte { payloadSize, // this is the dataSize field, but seeming the same as totalSize fieldCount, fieldPayload, - ) + ), err } // Size returns the total size of the transaction payload -- cgit