https://golang.org/ref/spec#Break_statements
A "break" statement terminates execution of the innermost "for", "switch", or "select" statement within the same function.
BreakStmt = "break" [ Label ] .
If there is a label, it must be that of an enclosing "for", "switch", or "select" statement, and that is the one whose execution terminates.
OuterLoop: for i = 0; i < n; i++ { for j = 0; j < m; j++ { switch a[i][j] { case nil: state = Error break OuterLoop case item: state = Found break OuterLoop } } }
https://golang.org/ref/spec#Continue_statements
A "continue" statement begins the next iteration of the innermost "for" loop at its post statement. The "for" loop must be within the same function.
ContinueStmt = "continue" [ Label ] .
If there is a label, it must be that of an enclosing "for" statement, and that is the one whose execution advances.
RowLoop: for y, row := range rows { for x, data := range row { if data == endOfRow { continue RowLoop } row[x] = data + bias(x, y) } }
https://golang.org/ref/spec#Goto_statements
A "goto" statement transfers control to the statement with the corresponding label within the same function.
GotoStmt = "goto" Label .
goto Error