package main import "fmt" func main() { switch "Marcus" { case "Tim": fmt.Println("Wassup Tim") case "Jenny": fmt.Println("Wassup Jenny") case "Marcus": fmt.Println("Wassup Marcus") fallthrough case "Medhi": fmt.Println("Wassup Medhi") fallthrough case "Julian": fmt.Println("Wassup Julian") case "Sushant": fmt.Println("Wassup Sushant") } }
GOROOT=C:\Program Files\Go #gosetup GOPATH=C:\Users\EDZ\go #gosetup "C:\Program Files\Go\bin\go.exe" build -o C:\Users\EDZ\AppData\Local\Temp\GoLand\___6go_build_main_go__2_.exe C:\Users\EDZ\Desktop\GolangTraining\11_switch-statements\02_fallthrough\main.go #gosetup C:\Users\EDZ\AppData\Local\Temp\GoLand\___6go_build_main_go__2_.exe #gosetup Wassup Marcus Wassup Medhi Wassup Julian 进程 已完成,退出代码为 0