I have the following byte array:
buf := make([]byte, 1) var value int8 value = 45 buf[0] = value // cannot use type int8 as type []byte in assignment
And when I want to put the char value in an array of bytes, I get the error message I cannot use type int8 as type []byte in assignment . What's wrong? How to do it?
source share