aboutsummaryrefslogtreecommitdiff
path: root/hotline/server_blackbox_test.go
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2024-06-15 11:13:16 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2024-06-15 11:13:16 -0700
commit95159e5585762c06c654945070ba54262b7dcec9 (patch)
tree23609018c1460b056ce22067290ea12ee851d483 /hotline/server_blackbox_test.go
parenta6216dd89252fa01dc176f98f1e4ecfd3f637566 (diff)
Refactoring and cleanup
* Split CLI client into separate project * Convert more functions to follow common Golang idioms e.g io.Reader, io.Writer * Use ldflags for versioning * Misc cleanup and simplification
Diffstat (limited to 'hotline/server_blackbox_test.go')
-rw-r--r--hotline/server_blackbox_test.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/hotline/server_blackbox_test.go b/hotline/server_blackbox_test.go
index 27ac4a7..059fe5a 100644
--- a/hotline/server_blackbox_test.go
+++ b/hotline/server_blackbox_test.go
@@ -1,7 +1,6 @@
package hotline
import (
- "bytes"
"encoding/hex"
"github.com/stretchr/testify/assert"
"log/slog"
@@ -40,7 +39,7 @@ func tranAssertEqual(t *testing.T, tran1, tran2 []Transaction) bool {
trans.ID = []byte{0, 0, 0, 0}
var fs []Field
for _, field := range trans.Fields {
- if bytes.Equal(field.ID, []byte{0x00, 0x6b}) {
+ if field.ID == [2]byte{0x00, 0x6b} {
continue
}
fs = append(fs, field)
@@ -53,7 +52,7 @@ func tranAssertEqual(t *testing.T, tran1, tran2 []Transaction) bool {
trans.ID = []byte{0, 0, 0, 0}
var fs []Field
for _, field := range trans.Fields {
- if bytes.Equal(field.ID, []byte{0x00, 0x6b}) {
+ if field.ID == [2]byte{0x00, 0x6b} {
continue
}
fs = append(fs, field)