I've found this operator |=
and I'm wondering what it means
func getPageInfoMode(r *http.Request) (mode PageInfoMode) {
for _, k := range strings.Split(r.FormValue("m"), ",") {
if m, found := modeNames[strings.TrimSpace(k)]; found {
mode |= m
}
}
return
}
Is an inplace bitwise OR operator https://golang.org/ref/spec#Operators.
There are many others:
+ & += &= && == !=
- | -= |= || < <=
* ^ *= ^= <- > >=
/ << /= <<= ++ = :=
% >> %= >>= -- !
&^ &^=