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賦值為空,讓前端顯示為[]呢
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/32899.html
標籤:go語言
上一篇:求滿足條件的最長字串的長度
下一篇:目標檢測自動標注生成xml檔案
