generate: Add comments to protocol data structures, tests

This commit is contained in:
2025-10-13 14:15:59 -04:00
parent 5a3d0e19ea
commit e991b5af67
5 changed files with 50 additions and 18 deletions

View File

@@ -83,11 +83,13 @@ func init() {
},
},
}
exampleProtocol.Types["User"] = TypeTableDefined {
Fields: map[uint16] Field {
0x0000: Field { Name: "Name", Type: TypeString { } },
0x0001: Field { Name: "Bio", Type: TypeString { } },
0x0002: Field { Name: "Followers", Type: TypeInt { Bits: 32 } },
exampleProtocol.Types["User"] = Typedef {
Type: TypeTableDefined {
Fields: map[uint16] Field {
0x0000: Field { Name: "Name", Type: TypeString { } },
0x0001: Field { Name: "Bio", Type: TypeString { } },
0x0002: Field { Name: "Followers", Type: TypeInt { Bits: 32 } },
},
},
}
}