Skip to content

Instantly share code, notes, and snippets.

@kjk
Created November 5, 2019 21:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kjk/b9fc06c6cd529c4141c349af0580b733 to your computer and use it in GitHub Desktop.
Save kjk/b9fc06c6cd529c4141c349af0580b733 to your computer and use it in GitHub Desktop.
for without test expression
// :collection Essential Go
package main
import "fmt"
func main() {
// :show start
i := 0
for ; ; i += 2 {
fmt.Printf("i: %d\n", i)
if i >= 5 {
break
}
}
// :show end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment