I am new to golang and confused by the & & operator.
From spec explanation "& ^": clear (AND NOT) bit. In my understanding, this means: x & ^ y == x and (^ y).
As far as I understand? Thanks!
Your understanding is correct. You can do this as a "bit operator", and the rules are:
1 &^ 1 = 0 1 &^ 0 = 1 0 &^ 0 = 0 0 &^ 1 = 0
As well as x & y, x ^ y, x | y.
x & y
x ^ y
x | y