Go control flow
Control flow determines which statements a Go program executes and in what order. Go uses if, switch, and for to express conditions, branches, and repetition.
Minimal example
for i := 0; i < 3; i++ {
if i == 1 {
continue
}
fmt.Println(i)
}Learn this concept
Lesson 1.4 · Go basics: types, functions and deferUsed in exercises
Exercise 1.8 · Practice: write your first Go programPrerequisite conceptsGo functions