Go语言通过 type 关键字声明结构体,格式如下: type 类型名 struct { // 标识结构体 字段1 字段1类型 字段2 字段2类型 ...} 同类型的变量也可以写在一行,用逗号隔开 type Student struct { sid, age int // 同类型的变量写在同一行 name string sex byte score [3]int}