码农笔录博客源码
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 

14 righe
259 B

package service
import (
"github.com/astaxie/beego/orm"
"beeblog/models"
)
func GetCats() ([]*models.Category, error) {
var notes []*models.Category
o := orm.NewOrm()
qs := o.QueryTable(models.Category{})
_, err := qs.All(&notes)
return notes, err
}