点击运行
package main import ( "fmt" ) func main() { a := [3][2]string{ {"lion", "tiger"}, {"cat", "dog"}, {"pigeon", "peacock"}, //this comma is necessary. The compiler will complain if you omit this comma } fmt.Println(a) }
运行结果 :
正在执行...