Go switch statement Break in For Loop
package main//from w w w.j a v a 2 s . c om import "fmt" func main() { testLoop:for val := 1; val < 7; val++ { fmt.Printf("%d", val) switch { case val == 1: fmt.Println("->1") case val == 5: fmt.Println("->5") break testLoop case val > 2: fmt.Println("-> greater than two") break default: fmt.Println("->default") } } }