// int to bytefuncIntToByte(num int)[]byte{
data :=int64(num)var buffer bytes.Buffer
err:=binary.Write(&buffer,binary.BigEndian,data)CheckErr("IntToByte",err)return buffer.Bytes()}
byte to int
// byte to intfuncByteToInt(bys []byte)int{
byteBuff := bytes.NewBuffer(bys)var data int64
err:=binary.Read(byteBuff, binary.BigEndian,&data)CheckErr("BytesToInt",err)returnint(data)}
int to byte// int to bytefunc IntToByte(num int64) []byte { var buffer bytes.Buffer err:=binary.Write(&buffer,binary.BigEndian,num) CheckErr("IntToByte",err) return buffer.Bytes()}byte t...