I get a byte slice ([]byte
) from a UDP socket and want to treat it as an integer slice ([]int32
) without changing the underlying array, and vice versa. In C(++) I would just cast between pointer types; how would I do this in Go?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…