Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
snippet for error loop, put it somewhere beneath ~/.config/sublime-text-3/Packages/User
var (
// define the variables here that are shared along the steps
// most variables should only by defined by the type here
// and are assigned inside the steps
err error
for jump := 1; err == nil; jump++ {
switch jump - 1 {
break steps
// count a number up for each following step
case 0:
// assign to err or vars from above
// jump to a step by assigning jump to the step number
// use err here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment