Goto

Go has a goto statement - use it wisely. With goto youjump to a label which must be defined within the current function.For instance, a loop in disguise:

  1. func myfunc() {
  2. i := 0
  3. Here:
  4. fmt.Println(i)
  5. i++
  6. goto Here
  7. }

The string Here: indicates a label. A label does not need to start witha capital letter and is case sensitive.