uint8 to byte golang code example
Example: uint64 to byte golang
i := int64(-123456789)
fmt.Println(i)
b := make([]byte, 8)
binary.LittleEndian.PutUint64(b, uint64(i))
fmt.Println(b)
i = int64(binary.LittleEndian.Uint64(b))
fmt.Println(i)
i := int64(-123456789)
fmt.Println(i)
b := make([]byte, 8)
binary.LittleEndian.PutUint64(b, uint64(i))
fmt.Println(b)
i = int64(binary.LittleEndian.Uint64(b))
fmt.Println(i)