If you want
func xor(a, b bool) bool { return a != b } fmt.Println(xor(true, false)) // true fmt.Println(xor(true, true)) // false