mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 07:02:11 +08:00
13 lines
237 B
Go
13 lines
237 B
Go
// compile error goto2.go:8: goto TARGET jumps over declaration of b at goto2.go:8
|
|
package main
|
|
|
|
import "fmt"
|
|
|
|
func main() {
|
|
a := 1
|
|
goto TARGET // compile error
|
|
b := 9
|
|
TARGET:
|
|
b += a
|
|
fmt.Printf("a is %v *** b is %v", a, b)
|
|
} |