golangUsing AND operator
package main
import (
"fmt"
)
func main() {
X := true
Y := false
xor := X && Y
}ctrl + c&&logical |
Usage example
package main
import (
"fmt"
)
func main() {
X := true
Y := false
fmt.Println(X && Y)
}
output
false
More of Golang
- How to set user agent for HTTP request
- How to use proxy with HTTP client
- How to generate random int
- How to sleep for 1 hour
- How to sleep for 500 milliseconds
- How to check Go version
- How to get request body from HTTP server
- How to generate random float
- How to sleep for 1 minute
- How to use capture regexp
See more codes...