Небольшой пример if, elseif, else main.go:
Код:
package main import "fmt" func main() { var age int fmt.Print("How old are you?") fmt.Scanf("%d", &age) if age >=0 && age < 18 { fmt.Println("You are very young!") } else if age >= 18 && age < 100 { fmt.Println("You are adult!") } else { fmt.Println("Error") } }