base.go 210 Bytes Edit Raw Blame History 1 2 3 4 5 6 7 8 9 10 11 12 package controllers import "github.com/astaxie/beego" type BaseController struct { beego.Controller } func (c *BaseController) RetData(resp map[string]interface{}) { c.Data["json"] = resp c.ServeJSON() }