1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-12 09:51:01 +00:00
This commit is contained in:
astaxie
2013-05-07 00:17:25 +08:00
parent 93babc5780
commit 1e7c1a265e
5 changed files with 1290 additions and 1015 deletions

View File

@ -192,6 +192,10 @@ func (c *Controller) Redirect(url string, code int) {
c.Ctx.Redirect(code, url)
}
func (c *Controller) Abort(code string) {
panic(code)
}
func (c *Controller) ServeJson() {
content, err := json.MarshalIndent(c.Data["json"], "", " ")
if err != nil {