0
的數組這是什麼說法意味着圍棋:Golang地圖與價值觀
Student.bookMap=map[string][]*model.Books{}
其中Student
是:
type Student struct{
bookMap map[string][]*model.Books
}
,我們有一個模型包
package model
type Books struct {
bookName string `db:"Name"`
bookAuthor string `db:"Author"`
}