break statement in Go
When a break statement is encountered inside a loop, the loop is immediately terminated and the program control resumes at the next statement following the loop. * The break statement can be used to terminate a case in a switch statement. Note Go does not require a break for case; it is optional. <pre><code>package main import "fmt" func main() { a := 0 for a < 10 { a++ fmt.Println(a) if a > 3 { break } } } </code></pre>