日常开发记录
golang开发中经常用到数组。
假设我们有一个类
type Student struct {
Id int64
Name string
Class string
Age int64
Address string
...
}
开发中需要创建一个Student
的数组,这时候如何选取?
- 直接创建
Students := make([]Student, 0
日常开发记录
golang开发中经常用到数组。
假设我们有一个类
type Student struct {
Id int64
Name string
Class string
Age int64
Address string
...
}
开发中需要创建一个Student
的数组,这时候如何选取?
Students := make([]Student, 0