直接复制你的答案编译也过不去。
➜ learn go run array.go
# command-line-arguments
./array.go:14: syntax error: unexpected name, expecting )
./array.go:19: non-declaration statement outside function body
./array.go:20: non-declaration statement outside function body
./array.go:22: syntax error: unexpected }
➜ learn go run array.go
# command-line-arguments
./array.go:14: syntax error: unexpected name, expecting )
./array.go:19: non-declaration statement outside function body
./array.go:20: non-declaration statement outside function body
./array.go:22: syntax error: unexpected }
2015-11-24