Typo fix and readibility improvements
This commit is contained in:
@@ -6,15 +6,15 @@ func hexEncodeToStringUpper(src []byte) string {
|
||||
return string(dst)
|
||||
}
|
||||
|
||||
var hextableUpper = [16]byte{
|
||||
var hexTableUppers = [16]byte{
|
||||
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
|
||||
'A', 'B', 'C', 'D', 'E', 'F',
|
||||
}
|
||||
|
||||
func hexEncodeUpper(dst, src []byte) int {
|
||||
for i, v := range src {
|
||||
dst[i*2] = hextableUpper[v>>4]
|
||||
dst[i*2+1] = hextableUpper[v&0x0f]
|
||||
dst[i*2] = hexTableUppers[v>>4]
|
||||
dst[i*2+1] = hexTableUppers[v&0x0f]
|
||||
}
|
||||
|
||||
return len(src) * 2
|
||||
|
||||
Reference in New Issue
Block a user