Configure golangci-lint and fix warnings
This commit is contained in:
parent
ecd1846975
commit
2e467b3d2e
20 changed files with 915 additions and 559 deletions
|
|
@ -7,6 +7,7 @@ const signerTimeFormat = "010203042006.05"
|
|||
func Encode24BitLength(data []byte) []byte {
|
||||
lengthBytes := make([]byte, 4)
|
||||
binary.BigEndian.PutUint32(lengthBytes, uint32(len(data)))
|
||||
|
||||
return lengthBytes[1:]
|
||||
}
|
||||
|
||||
|
|
@ -17,10 +18,12 @@ func Decode24BitLength(bytes []byte) int {
|
|||
|
||||
func CalculateXorCheckSum(byteBlocks [][]byte) byte {
|
||||
var result byte = 0x0
|
||||
|
||||
for _, byteBlock := range byteBlocks {
|
||||
for _, b := range byteBlock {
|
||||
result ^= b
|
||||
}
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue