Table of Contents

Go - Flow

Boolean Control-flow statements

Control statements may include an optional simple statement:

Break and continue

The break and continue statements modify the flow of control.

Statements may be labeled so that break and continue can refer to them, for instance to break out of several nested loops at once or to start the next iteration of the outermost loop. There is even a goto statement, though it’s intended for machine-generated code, not regular use by programmers.

List

Switch

switch coinflip() {
case "heads":
	heads++
case "tails":
	tails++
default:
	fmt.Println(" landed on edge!")
}

Documentation / Reference