golang的结构成员里有数组结构怎么初始为空
type Page struct {
Title string // title
Body string // body
View int // view count
IsPublished bool // published or not
OtherPage []*Page ////
}
var myPage []*Page
用gorm查询后,为空或者查询到但是这个OtherPage会显示为null,在前端显示,这个怎样给otherpage赋值为空,让前端显示为[]呢