mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 13:00:54 +00:00
fix the comments update
This commit is contained in:
parent
5ea04bdfd3
commit
24885c28f2
2
beego.go
2
beego.go
@ -31,7 +31,7 @@ const (
|
||||
PROD = "prod"
|
||||
)
|
||||
|
||||
// Map shortcut
|
||||
// M is Map shortcut
|
||||
type M map[string]interface{}
|
||||
|
||||
// Hook function to run
|
||||
|
@ -296,7 +296,7 @@ func (c *Controller) Redirect(url string, code int) {
|
||||
c.Ctx.Redirect(code, url)
|
||||
}
|
||||
|
||||
// Set the data depending on the accepted
|
||||
// SetData set the data depending on the accepted
|
||||
func (c *Controller) SetData(data interface{}) {
|
||||
accept := c.Ctx.Input.Header("Accept")
|
||||
switch accept {
|
||||
@ -370,7 +370,7 @@ func (c *Controller) ServeXML() {
|
||||
c.Ctx.Output.XML(c.Data["xml"], hasIndent)
|
||||
}
|
||||
|
||||
// ServeXML sends xml response.
|
||||
// ServeYAML sends yaml response.
|
||||
func (c *Controller) ServeYAML() {
|
||||
c.Ctx.Output.YAML(c.Data["yaml"])
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user