From f4fcb46168f4c56bb96a588eb76e893736024957 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Tue, 19 May 2026 10:46:23 +0200 Subject: [PATCH] Restructure to library --- agw.go => agwpe.go | 2 +- agwpe_test.go | 1 + go.mod | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) rename agw.go => agwpe.go (91%) create mode 100644 agwpe_test.go diff --git a/agw.go b/agwpe.go similarity index 91% rename from agw.go rename to agwpe.go index 46b1785..61e2372 100644 --- a/agw.go +++ b/agwpe.go @@ -26,7 +26,7 @@ func (f *Frame) Serialize() []byte { // Ignore reserved byte 7 copy(buf[8:18], f.CallFrom[:]) copy(buf[18:28], f.CallTo[:]) - binary.BigEndian.PutUint32(buf[28:32], f.DataLen) + binary.LittleEndian.PutUint32(buf[28:32], f.DataLen) copy(buf[32:36], f.User[:]) return buf diff --git a/agwpe_test.go b/agwpe_test.go new file mode 100644 index 0000000..f52728f --- /dev/null +++ b/agwpe_test.go @@ -0,0 +1 @@ +agwpe_test.go diff --git a/go.mod b/go.mod index 55192b2..41052f3 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module go-agw/agw +module go-agwpe/agwpe go 1.24.5