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