mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-11 22:53:43 +08:00
19 lines
220 B
Go
Executable File
19 lines
220 B
Go
Executable File
package main
|
|
|
|
import "fmt"
|
|
|
|
func main() {
|
|
// 1:
|
|
for i := 0; i < 15; i++ {
|
|
fmt.Printf("The counter is at %d\n", i)
|
|
}
|
|
// 2:
|
|
i := 0
|
|
START:
|
|
fmt.Printf("The counter is at %d\n", i)
|
|
i++
|
|
if i < 15 {
|
|
goto START
|
|
}
|
|
}
|