aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2025-11-18 20:56:12 -0800
committerJeff Halter <868228+jhalter@users.noreply.github.com>2025-11-18 20:56:12 -0800
commit489e26d1b3c224beffba2649406efd83580989fe (patch)
treeecb447b869c9af1df15ce8d88d7a5d013133ae1d /internal
parentecae9f7cbc7a462aefdb167fa6a8b2ae83009540 (diff)
Replace hardcoded magic values with named constants and improve type safety
Adds new constants for file format identifiers (FormatFILP), fork types (ForkTypeINFO), and platform identifiers (PlatformAMAC, PlatformMWIN) to improve code maintainability and readability. Changes FlatFileForkHeader.ForkType field from [4]byte to ForkType type alias for better compile-time type checking, matching the pattern used in ForkInfoList.Fork.
Diffstat (limited to 'internal')
-rw-r--r--internal/mobius/transaction_handlers_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/mobius/transaction_handlers_test.go b/internal/mobius/transaction_handlers_test.go
index 1c3fac0..d943649 100644
--- a/internal/mobius/transaction_handlers_test.go
+++ b/internal/mobius/transaction_handlers_test.go
@@ -1917,11 +1917,11 @@ func TestHandleDownloadFile(t *testing.T) {
ForkCount: [2]byte{0, 2},
ForkInfoList: []hotline.ForkInfoList{
{
- Fork: [4]byte{0x44, 0x41, 0x54, 0x41}, // "DATA"
- DataSize: [4]byte{0, 0, 0x01, 0x00}, // request offset 256
+ Fork: hotline.ForkTypeDATA,
+ DataSize: [4]byte{0, 0, 0x01, 0x00}, // request offset 256
},
{
- Fork: [4]byte{0x4d, 0x41, 0x43, 0x52}, // "MACR"
+ Fork: hotline.ForkTypeMACR,
DataSize: [4]byte{0, 0, 0, 0},
},
},