switch.go 131 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
package main

import "fmt"

func main() {
	i := 2
	switch i {
	case 1:
		fmt.Println("i = 1")
	case 2:
		fmt.Println("i = 2")
	}
}