diff options
| author | Jeff Halter <868228+jhalter@users.noreply.github.com> | 2021-08-10 18:52:46 -0700 |
|---|---|---|
| committer | Jeff Halter <868228+jhalter@users.noreply.github.com> | 2021-08-10 13:52:46 -0700 |
| commit | 72dd37f1abb2b550aaaac48eac677403d5664797 (patch) | |
| tree | 5c431679475647f2f932f2934e6acd65090d2499 /hotline/transaction.go | |
| parent | 9d41bcdf29778eab3253f8e31670baf64ad389bf (diff) | |
Add tests and clean up
Diffstat (limited to 'hotline/transaction.go')
| -rw-r--r-- | hotline/transaction.go | 4 |
1 files changed, 2 insertions, 2 deletions
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 |