mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-09-01 00:24:02 +03:00
Remove unnecessary hexify function
This commit is contained in:
@@ -1,10 +1,5 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type Uint24 [3]byte
|
||||
|
||||
func ToUint24(number uint32) Uint24 {
|
||||
@@ -14,17 +9,3 @@ func ToUint24(number uint32) Uint24 {
|
||||
func FromUint24(number Uint24) uint32 {
|
||||
return uint32(number[0]) + (uint32(number[1]) << 8) + (uint32(number[2]) << 16)
|
||||
}
|
||||
|
||||
func Hexify(data []byte) string {
|
||||
s := []string{}
|
||||
|
||||
for _, v := range data {
|
||||
if v < 0x10 {
|
||||
s = append(s, fmt.Sprintf("0x0%x", v))
|
||||
} else {
|
||||
s = append(s, fmt.Sprintf("0x%x", v))
|
||||
}
|
||||
}
|
||||
|
||||
return strings.Join(s, " ")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user