Golang bitwise operations as well as general byte manipulation
问题 I have some c# code that performs some bitwise operations on a byte. I am trying to do the same in golang but am having difficulties. Example in c# byte a, c; byte[] data; int j; c = data[j]; c = (byte)(c + j); c ^= a; c ^= 0xFF; c += 0x48; I have read that golang cannot perform bitwise operations on the byte type. Therefore will I have to modify my code to a type uint8 to perform these operations? If so is there a clean and correct/standard way to implement this? 回答1: Go certainly can do