chore: apply gofmt formatting

This commit is contained in:
Houmgaor
2026-02-06 13:02:38 +01:00
parent 09f829f8be
commit 4960c5cb5d
16 changed files with 159 additions and 148 deletions

View File

@@ -9,7 +9,8 @@
// Packet Structure:
//
// MHF packets follow this wire format:
// [2 bytes: Opcode][N bytes: Packet-specific data][2 bytes: Footer 0x00 0x10]
//
// [2 bytes: Opcode][N bytes: Packet-specific data][2 bytes: Footer 0x00 0x10]
//
// Each packet type defines its own structure matching the binary format expected
// by the Monster Hunter Frontier client.

View File

@@ -514,9 +514,9 @@ func TestMsgMhfUpdateEtcPointOpcode(t *testing.T) {
// TestAchievementPacketParse tests simple achievement packet parsing
func TestAchievementPacketParse(t *testing.T) {
bf := byteframe.NewByteFrame()
bf.WriteUint8(5) // AchievementID
bf.WriteUint16(100) // Unk1
bf.WriteUint16(200) // Unk2
bf.WriteUint8(5) // AchievementID
bf.WriteUint16(100) // Unk1
bf.WriteUint16(200) // Unk2
bf.Seek(0, io.SeekStart)
pkt := &MsgMhfAddAchievement{}

View File

@@ -36,9 +36,9 @@ func TestMsgMhfGetAchievementDetailedParse(t *testing.T) {
// TestMsgMhfAddAchievementDetailedParse tests MsgMhfAddAchievement parsing
func TestMsgMhfAddAchievementDetailedParse(t *testing.T) {
bf := byteframe.NewByteFrame()
bf.WriteUint8(42) // AchievementID
bf.WriteUint16(12345) // Unk1
bf.WriteUint16(0xFFFF) // Unk2 - max value
bf.WriteUint8(42) // AchievementID
bf.WriteUint16(12345) // Unk1
bf.WriteUint16(0xFFFF) // Unk2 - max value
bf.Seek(0, io.SeekStart)
pkt := &MsgMhfAddAchievement{}
@@ -61,12 +61,12 @@ func TestMsgMhfAddAchievementDetailedParse(t *testing.T) {
// TestMsgSysCastBinaryDetailedParse tests MsgSysCastBinary parsing with various payloads
func TestMsgSysCastBinaryDetailedParse(t *testing.T) {
tests := []struct {
name string
unk0 uint16
unk1 uint16
name string
unk0 uint16
unk1 uint16
broadcastType uint8
messageType uint8
payload []byte
payload []byte
}{
{"empty payload", 0, 0, 1, 2, []byte{}},
{"typical payload", 100, 200, 0x10, 0x20, []byte{0x01, 0x02, 0x03}},