diff --git a/color.go b/color.go index ef3d2b4..7055f63 100644 --- a/color.go +++ b/color.go @@ -2,7 +2,6 @@ package main import ( "strconv" - "unsafe" ) const GREY = "\x1b[38;2;111;111;111m" @@ -46,22 +45,3 @@ func (c *Color) Colorize(s string, clr byte) string { func (c *Color) Colorize2(clr byte) ([]byte, []byte) { return c.cvalues[clr], CLRR } - -func IntToByteArray(num int) []byte { - size := int(unsafe.Sizeof(num)) - arr := make([]byte, size) - for i := 0; i < size; i++ { - byt := *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&num)) + uintptr(i))) - arr[i] = byt - } - return arr -} - -func ByteArrayToInt(arr []byte) int64 { - val := int64(0) - size := len(arr) - for i := 0; i < size; i++ { - *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&val)) + uintptr(i))) = arr[i] - } - return val -}