mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 01:21:38 +08:00
05.0.md
This commit is contained in:
12
eBook/examples/chapter_5/goto.go
Normal file
12
eBook/examples/chapter_5/goto.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package main
|
||||
|
||||
func main() {
|
||||
i:=0
|
||||
HERE:
|
||||
print(i)
|
||||
i++
|
||||
if i==5 {
|
||||
return
|
||||
}
|
||||
goto HERE
|
||||
}
|
Reference in New Issue
Block a user