put a space between
//
and comment text 22 encryptedFileRaw *[]uint8 //[sizeEncryptedFile]uint8
23 encryptedPackets []*MsgHeader = []*MsgHeader{}
24 sizeDecryptedFile int64
25 decryptedFileRaw *[]uint8 //[sizeDecryptedFile]uint8 26 decryptedPackets []*MsgHeader = []*MsgHeader{}
27)
28
put a space between
//
and comment text 19var (
20 keys []uint8 = make([]uint8, 512)
21 sizeEncryptedFile int64
22 encryptedFileRaw *[]uint8 //[sizeEncryptedFile]uint8 23 encryptedPackets []*MsgHeader = []*MsgHeader{}
24 sizeDecryptedFile int64
25 decryptedFileRaw *[]uint8 //[sizeDecryptedFile]uint8
put a space between
//
and comment text 13 hash uint8 //Hash generated to validate the process
14 code int16 //Internal packet identifier
15 index int16 //Index from the user that sent the packet
16 timestamp uint32 //Timestamp usually get right before starting the enc/dec process 17}
18
19var (
put a space between
//
and comment text 12 key uint8 //Key used as seed for enc/dec
13 hash uint8 //Hash generated to validate the process
14 code int16 //Internal packet identifier
15 index int16 //Index from the user that sent the packet 16 timestamp uint32 //Timestamp usually get right before starting the enc/dec process
17}
18
put a space between
//
and comment text 11 size uint16 //Packet size
12 key uint8 //Key used as seed for enc/dec
13 hash uint8 //Hash generated to validate the process
14 code int16 //Internal packet identifier 15 index int16 //Index from the user that sent the packet
16 timestamp uint32 //Timestamp usually get right before starting the enc/dec process
17}
put a space between
//
and comment text 10type MsgHeader struct {
11 size uint16 //Packet size
12 key uint8 //Key used as seed for enc/dec
13 hash uint8 //Hash generated to validate the process 14 code int16 //Internal packet identifier
15 index int16 //Index from the user that sent the packet
16 timestamp uint32 //Timestamp usually get right before starting the enc/dec process
put a space between
//
and comment text 9//MsgHeader defines the basic struct for a WYD2 packet header
10type MsgHeader struct {
11 size uint16 //Packet size
12 key uint8 //Key used as seed for enc/dec 13 hash uint8 //Hash generated to validate the process
14 code int16 //Internal packet identifier
15 index int16 //Index from the user that sent the packet
put a space between
//
and comment text 8
9//MsgHeader defines the basic struct for a WYD2 packet header
10type MsgHeader struct {
11 size uint16 //Packet size 12 key uint8 //Key used as seed for enc/dec
13 hash uint8 //Hash generated to validate the process
14 code int16 //Internal packet identifier
put a space between
//
and comment text 6 "unsafe"
7)
8
9//MsgHeader defines the basic struct for a WYD2 packet header 10type MsgHeader struct {
11 size uint16 //Packet size
12 key uint8 //Key used as seed for enc/dec
Description
Comments should have a space between the //
and the comment text
Bad practice
//This is a comment
Recommended
// This is a comment