Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
24885c28
Commit
24885c28
authored
Nov 09, 2018
by
astaxie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix the comments update
parent
5ea04bdf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
beego.go
beego.go
+1
-1
controller.go
controller.go
+2
-2
No files found.
beego.go
View file @
24885c28
...
...
@@ -31,7 +31,7 @@ const (
PROD
=
"prod"
)
// Map shortcut
// M
is M
ap shortcut
type
M
map
[
string
]
interface
{}
// Hook function to run
...
...
controller.go
View file @
24885c28
...
...
@@ -296,7 +296,7 @@ func (c *Controller) Redirect(url string, code int) {
c
.
Ctx
.
Redirect
(
code
,
url
)
}
// Set the data depending on the accepted
// Set
Data 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
)
}
// Serve
XML sends x
ml response.
// Serve
YAML sends ya
ml response.
func
(
c
*
Controller
)
ServeYAML
()
{
c
.
Ctx
.
Output
.
YAML
(
c
.
Data
[
"yaml"
])
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment