From 95159e5585762c06c654945070ba54262b7dcec9 Mon Sep 17 00:00:00 2001 From: Jeff Halter <868228+jhalter@users.noreply.github.com> Date: Sat, 15 Jun 2024 11:13:16 -0700 Subject: 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 --- hotline/server_blackbox_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'hotline/server_blackbox_test.go') 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) -- cgit