Keyword
Go continue keyword
Starts the next iteration of an enclosing for loop; in a three-part for it proceeds through the post statement first. A label may target an outer enclosing loop. Example skips 2.
Formal Syntax & Structure
go syntaxgo
continue [Label]Working Example
Example Snippetgo
package main
import "fmt"
func main() { for i := 1; i <= 3; i++ { if i == 2 { continue } fmt.Println(i) }}