aboutsummaryrefslogtreecommitdiff
path: root/hotline/transaction_test.go
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2024-06-17 20:30:49 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2024-06-17 20:30:49 -0700
commit153e2eac3b51a6a426556752fa2c532cfe53f026 (patch)
treedf83911537b02f61396ecbca5c4796fd0c3db958 /hotline/transaction_test.go
parentf8e4cd540b87de3e308ec18a2b040b284a741522 (diff)
Use fixed size array types in Transaction fields
Diffstat (limited to 'hotline/transaction_test.go')
-rw-r--r--hotline/transaction_test.go30
1 files changed, 15 insertions, 15 deletions
diff --git a/hotline/transaction_test.go b/hotline/transaction_test.go
index cdb6f1e..b5ee990 100644
--- a/hotline/transaction_test.go
+++ b/hotline/transaction_test.go
@@ -304,12 +304,12 @@ func TestTransaction_Read(t1 *testing.T) {
clientID *[]byte
Flags byte
IsReply byte
- Type []byte
- ID []byte
- ErrorCode []byte
- TotalSize []byte
- DataSize []byte
- ParamCount []byte
+ Type [2]byte
+ ID [4]byte
+ ErrorCode [4]byte
+ TotalSize [4]byte
+ DataSize [4]byte
+ ParamCount [2]byte
Fields []Field
readOffset int
}
@@ -329,9 +329,9 @@ func TestTransaction_Read(t1 *testing.T) {
fields: fields{
Flags: 0x00,
IsReply: 0x01,
- Type: []byte{0, 0},
- ID: []byte{0x9a, 0xcb, 0x04, 0x42},
- ErrorCode: []byte{0, 0, 0, 0},
+ Type: [2]byte{0, 0},
+ ID: [4]byte{0x9a, 0xcb, 0x04, 0x42},
+ ErrorCode: [4]byte{0, 0, 0, 0},
Fields: []Field{
NewField(FieldData, []byte("TEST")),
},
@@ -348,9 +348,9 @@ func TestTransaction_Read(t1 *testing.T) {
fields: fields{
Flags: 0x00,
IsReply: 0x01,
- Type: []byte{0, 0},
- ID: []byte{0x9a, 0xcb, 0x04, 0x42},
- ErrorCode: []byte{0, 0, 0, 0},
+ Type: [2]byte{0, 0},
+ ID: [4]byte{0x9a, 0xcb, 0x04, 0x42},
+ ErrorCode: [4]byte{0, 0, 0, 0},
Fields: []Field{
NewField(FieldData, []byte("TEST")),
},
@@ -368,9 +368,9 @@ func TestTransaction_Read(t1 *testing.T) {
fields: fields{
Flags: 0x00,
IsReply: 0x01,
- Type: []byte{0, 0},
- ID: []byte{0x9a, 0xcb, 0x04, 0x42},
- ErrorCode: []byte{0, 0, 0, 0},
+ Type: [2]byte{0, 0},
+ ID: [4]byte{0x9a, 0xcb, 0x04, 0x42},
+ ErrorCode: [4]byte{0, 0, 0, 0},
Fields: []Field{
NewField(FieldData, []byte("TEST")),
},