What is the best way to check that Go string and a byte slice contain the same bytes? The simplest str == string(byteSlice)
is inefficient as it copies byteSlice
first.
I was looking for a version of Equal(a, b []byte) that takes a string as its argument, but could not find anything suitable.