Advertisement
cwchen

[Go] goto demo.

Sep 16th, 2017
862
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.14 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4.     "fmt"
  5. )
  6.  
  7. func main() {
  8.     i := 1
  9.  
  10. LOOP:
  11.     fmt.Println(i)
  12.     i += 1
  13.     if i > 5 {
  14.         goto END
  15.     }
  16.     goto LOOP
  17.  
  18. END:
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement