Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (27 sloc) 526 Bytes
package main
import (
"fmt"
)
func main() {
if true {
// would be executed
fmt.Println("This is the if branch")
}
if false {
// would not be executed
fmt.Println("This is the if branch")
} else {
// would be executed
fmt.Println("This is the else branch")
}
if false {
// would not be executed
fmt.Println("This is the if branch")
} else if true {
// would be executed
fmt.Println("This is the else if branch")
} else {
// would not be executed
fmt.Println("This is the else branch")
}
}
You can’t perform that action at this time.