package main import ( "fmt" ) func main() { b := false if b { fmt.Println("b is true!") } else { fmt.Println("b is false!") } } ### To run, ### copy code to buffer ### cat > /tmp/if-else.go ### go run /tmp/if-else.go
Go Programming Main Page