GOLANG学习23. 定义结构体
package main
import (
"fmt"
)
type Student struct {
Name string
Age int
Score float32
}
func main() {
var stu = Student{
Name: "张三",
Age: 20,
Score: 98.6,
}
fmt.Println(stu.Name, stu.Age, stu.Score)
}