mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 03:55:28 +08:00
16 lines
229 B
Go
Executable File
16 lines
229 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 }
|
|
} |