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
67b36d7c
Commit
67b36d7c
authored
Sep 08, 2015
by
astaxie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make golint happy
parent
61570ac2
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
94 additions
and
88 deletions
+94
-88
controller.go
controller.go
+2
-2
doc.go
doc.go
+1
-1
docs.go
docs.go
+5
-4
error.go
error.go
+3
-3
filter.go
filter.go
+1
-2
flash_test.go
flash_test.go
+1
-1
hooks.go
hooks.go
+10
-10
log.go
log.go
+9
-6
memzipfile.go
memzipfile.go
+4
-2
mime.go
mime.go
+1
-1
namespace.go
namespace.go
+53
-52
router.go
router.go
+2
-2
router_test.go
router_test.go
+2
-2
No files found.
controller.go
View file @
67b36d7c
...
...
@@ -88,8 +88,8 @@ type ControllerInterface interface {
Options
()
Finish
()
Render
()
error
X
srf
Token
()
string
CheckX
srf
Cookie
()
bool
X
SRF
Token
()
string
CheckX
SRF
Cookie
()
bool
HandlerFunc
(
fn
string
)
bool
URLMapping
()
}
...
...
doc.go
View file @
67b36d7c
/*
Package beego provide a MVC framework
beego: an open-source, high-performance, modular, full-stack web framework
It is used for rapid development of RESTful APIs, web apps and backend services in Go.
...
...
@@ -14,4 +15,3 @@ beego is inspired by Tornado, Sinatra and Flask with the added benefit of some G
more infomation: http://beego.me
*/
package
beego
docs.go
View file @
67b36d7c
...
...
@@ -20,20 +20,21 @@ import (
"github.com/astaxie/beego/context"
)
var
GlobalDocApi
map
[
string
]
interface
{}
// GlobalDocAPI store the swagger api documents
var
GlobalDocAPI
map
[
string
]
interface
{}
func
init
()
{
if
EnableDocs
{
GlobalDocA
pi
=
make
(
map
[
string
]
interface
{})
GlobalDocA
PI
=
make
(
map
[
string
]
interface
{})
}
}
func
serverDocs
(
ctx
*
context
.
Context
)
{
var
obj
interface
{}
if
splat
:=
ctx
.
Input
.
Param
(
":splat"
);
splat
==
""
{
obj
=
GlobalDocA
pi
[
"Root"
]
obj
=
GlobalDocA
PI
[
"Root"
]
}
else
{
if
v
,
ok
:=
GlobalDocA
pi
[
splat
];
ok
{
if
v
,
ok
:=
GlobalDocA
PI
[
splat
];
ok
{
obj
=
v
}
}
...
...
error.go
View file @
67b36d7c
...
...
@@ -362,7 +362,7 @@ func gatewayTimeout(rw http.ResponseWriter, r *http.Request) {
// usage:
// beego.ErrorHandler("404",NotFound)
// beego.ErrorHandler("500",InternalServerError)
func
Error
h
andler
(
code
string
,
h
http
.
HandlerFunc
)
*
App
{
func
Error
H
andler
(
code
string
,
h
http
.
HandlerFunc
)
*
App
{
errinfo
:=
&
errorInfo
{}
errinfo
.
errorType
=
errorTypeHandler
errinfo
.
handler
=
h
...
...
@@ -373,7 +373,7 @@ func Errorhandler(code string, h http.HandlerFunc) *App {
// ErrorController registers ControllerInterface to each http err code string.
// usage:
// beego.Error
Hand
ler(&controllers.ErrorController{})
// beego.Error
Control
ler(&controllers.ErrorController{})
func
ErrorController
(
c
ControllerInterface
)
*
App
{
reflectVal
:=
reflect
.
ValueOf
(
c
)
rt
:=
reflectVal
.
Type
()
...
...
@@ -431,7 +431,7 @@ func executeError(err *errorInfo, ctx *context.Context, code int) {
execController
.
URLMapping
()
in
:=
make
([]
reflect
.
Value
,
0
)
var
in
[]
reflect
.
Value
method
:=
vc
.
MethodByName
(
err
.
method
)
method
.
Call
(
in
)
...
...
filter.go
View file @
67b36d7c
...
...
@@ -39,7 +39,6 @@ func (f *FilterRouter) ValidRouter(url string) (bool, map[string]string) {
}
if
isok
,
ok
:=
isok
.
(
bool
);
ok
{
return
isok
,
params
}
else
{
return
false
,
nil
}
return
false
,
nil
}
flash_test.go
View file @
67b36d7c
...
...
@@ -30,7 +30,7 @@ func (t *TestFlashController) TestWriteFlash() {
flash
.
Notice
(
"TestFlashString"
)
flash
.
Store
(
&
t
.
Controller
)
// we choose to serve json because we don't want to load a template html file
t
.
ServeJ
son
(
true
)
t
.
ServeJ
SON
(
true
)
}
func
TestFlashHeader
(
t
*
testing
.
T
)
{
...
...
hooks.go
View file @
67b36d7c
...
...
@@ -19,41 +19,41 @@ func registerMime() error {
// register default error http handlers, 404,401,403,500 and 503.
func
registerDefaultErrorHandler
()
error
{
if
_
,
ok
:=
ErrorMaps
[
"401"
];
!
ok
{
Error
h
andler
(
"401"
,
unauthorized
)
Error
H
andler
(
"401"
,
unauthorized
)
}
if
_
,
ok
:=
ErrorMaps
[
"402"
];
!
ok
{
Error
h
andler
(
"402"
,
paymentRequired
)
Error
H
andler
(
"402"
,
paymentRequired
)
}
if
_
,
ok
:=
ErrorMaps
[
"403"
];
!
ok
{
Error
h
andler
(
"403"
,
forbidden
)
Error
H
andler
(
"403"
,
forbidden
)
}
if
_
,
ok
:=
ErrorMaps
[
"404"
];
!
ok
{
Error
h
andler
(
"404"
,
notFound
)
Error
H
andler
(
"404"
,
notFound
)
}
if
_
,
ok
:=
ErrorMaps
[
"405"
];
!
ok
{
Error
h
andler
(
"405"
,
methodNotAllowed
)
Error
H
andler
(
"405"
,
methodNotAllowed
)
}
if
_
,
ok
:=
ErrorMaps
[
"500"
];
!
ok
{
Error
h
andler
(
"500"
,
internalServerError
)
Error
H
andler
(
"500"
,
internalServerError
)
}
if
_
,
ok
:=
ErrorMaps
[
"501"
];
!
ok
{
Error
h
andler
(
"501"
,
notImplemented
)
Error
H
andler
(
"501"
,
notImplemented
)
}
if
_
,
ok
:=
ErrorMaps
[
"502"
];
!
ok
{
Error
h
andler
(
"502"
,
badGateway
)
Error
H
andler
(
"502"
,
badGateway
)
}
if
_
,
ok
:=
ErrorMaps
[
"503"
];
!
ok
{
Error
h
andler
(
"503"
,
serviceUnavailable
)
Error
H
andler
(
"503"
,
serviceUnavailable
)
}
if
_
,
ok
:=
ErrorMaps
[
"504"
];
!
ok
{
Error
h
andler
(
"504"
,
gatewayTimeout
)
Error
H
andler
(
"504"
,
gatewayTimeout
)
}
return
nil
}
...
...
log.go
View file @
67b36d7c
...
...
@@ -32,18 +32,18 @@ const (
LevelDebug
)
// SetLogLevel sets the global log level used by the simple
// logger.
// SetLevel sets the global log level used by the simple logger.
func
SetLevel
(
l
int
)
{
BeeLogger
.
SetLevel
(
l
)
}
// SetLogFuncCall set the CallDepth, default is 3
func
SetLogFuncCall
(
b
bool
)
{
BeeLogger
.
EnableFuncCallDepth
(
b
)
BeeLogger
.
SetLogFuncCallDepth
(
3
)
}
//
l
ogger references the used application logger.
//
BeeL
ogger references the used application logger.
var
BeeLogger
*
logs
.
BeeLogger
// SetLogger sets a new logger.
...
...
@@ -55,10 +55,12 @@ func SetLogger(adaptername string, config string) error {
return
nil
}
// Emergency logs a message at emergency level.
func
Emergency
(
v
...
interface
{})
{
BeeLogger
.
Emergency
(
generateFmtStr
(
len
(
v
)),
v
...
)
}
// Alert logs a message at alert level.
func
Alert
(
v
...
interface
{})
{
BeeLogger
.
Alert
(
generateFmtStr
(
len
(
v
)),
v
...
)
}
...
...
@@ -78,21 +80,22 @@ func Warning(v ...interface{}) {
BeeLogger
.
Warning
(
generateFmtStr
(
len
(
v
)),
v
...
)
}
// compatibility alias for Warning()
//
Warn
compatibility alias for Warning()
func
Warn
(
v
...
interface
{})
{
BeeLogger
.
Warn
(
generateFmtStr
(
len
(
v
)),
v
...
)
}
// Notice logs a message at notice level.
func
Notice
(
v
...
interface
{})
{
BeeLogger
.
Notice
(
generateFmtStr
(
len
(
v
)),
v
...
)
}
// Info logs a message at info level.
// Info
rmational
logs a message at info level.
func
Informational
(
v
...
interface
{})
{
BeeLogger
.
Informational
(
generateFmtStr
(
len
(
v
)),
v
...
)
}
// compatibility alias for Warning()
//
Info
compatibility alias for Warning()
func
Info
(
v
...
interface
{})
{
BeeLogger
.
Info
(
generateFmtStr
(
len
(
v
)),
v
...
)
}
...
...
memzipfile.go
View file @
67b36d7c
...
...
@@ -28,8 +28,10 @@ import (
"time"
)
var
gmfim
map
[
string
]
*
memFileInfo
=
make
(
map
[
string
]
*
memFileInfo
)
var
lock
sync
.
RWMutex
var
(
gmfim
=
make
(
map
[
string
]
*
memFileInfo
)
lock
sync
.
RWMutex
)
// OpenMemZipFile returns MemFile object with a compressed static file.
// it's used for serve static file if gzip enable.
...
...
mime.go
View file @
67b36d7c
...
...
@@ -14,7 +14,7 @@
package
beego
var
mimemaps
map
[
string
]
string
=
map
[
string
]
string
{
var
mimemaps
=
map
[
string
]
string
{
".3dm"
:
"x-world/x-3dmf"
,
".3dmf"
:
"x-world/x-3dmf"
,
".7z"
:
"application/x-7z-compressed"
,
...
...
namespace.go
View file @
67b36d7c
...
...
@@ -23,7 +23,8 @@ import (
type
namespaceCond
func
(
*
beecontext
.
Context
)
bool
type
innerNamespace
func
(
*
Namespace
)
// LinkNamespace used as link action
type
LinkNamespace
func
(
*
Namespace
)
// Namespace is store all the info
type
Namespace
struct
{
...
...
@@ -31,8 +32,8 @@ type Namespace struct {
handlers
*
ControllerRegister
}
// get new Namespace
func
NewNamespace
(
prefix
string
,
params
...
inner
Namespace
)
*
Namespace
{
//
NewNamespace
get new Namespace
func
NewNamespace
(
prefix
string
,
params
...
Link
Namespace
)
*
Namespace
{
ns
:=
&
Namespace
{
prefix
:
prefix
,
handlers
:
NewControllerRegister
(),
...
...
@@ -43,7 +44,7 @@ func NewNamespace(prefix string, params ...innerNamespace) *Namespace {
return
ns
}
// set condtion function
//
Cond
set condtion function
// if cond return true can run this namespace, else can't
// usage:
// ns.Cond(func (ctx *context.Context) bool{
...
...
@@ -72,7 +73,7 @@ func (n *Namespace) Cond(cond namespaceCond) *Namespace {
return
n
}
// add filter in the Namespace
//
Filter
add filter in the Namespace
// action has before & after
// FilterFunc
// usage:
...
...
@@ -95,98 +96,98 @@ func (n *Namespace) Filter(action string, filter ...FilterFunc) *Namespace {
return
n
}
// same as beego.Rourer
//
Router
same as beego.Rourer
// refer: https://godoc.org/github.com/astaxie/beego#Router
func
(
n
*
Namespace
)
Router
(
rootpath
string
,
c
ControllerInterface
,
mappingMethods
...
string
)
*
Namespace
{
n
.
handlers
.
Add
(
rootpath
,
c
,
mappingMethods
...
)
return
n
}
// same as beego.AutoRouter
//
AutoRouter
same as beego.AutoRouter
// refer: https://godoc.org/github.com/astaxie/beego#AutoRouter
func
(
n
*
Namespace
)
AutoRouter
(
c
ControllerInterface
)
*
Namespace
{
n
.
handlers
.
AddAuto
(
c
)
return
n
}
// same as beego.AutoPrefix
//
AutoPrefix
same as beego.AutoPrefix
// refer: https://godoc.org/github.com/astaxie/beego#AutoPrefix
func
(
n
*
Namespace
)
AutoPrefix
(
prefix
string
,
c
ControllerInterface
)
*
Namespace
{
n
.
handlers
.
AddAutoPrefix
(
prefix
,
c
)
return
n
}
// same as beego.Get
//
Get
same as beego.Get
// refer: https://godoc.org/github.com/astaxie/beego#Get
func
(
n
*
Namespace
)
Get
(
rootpath
string
,
f
FilterFunc
)
*
Namespace
{
n
.
handlers
.
Get
(
rootpath
,
f
)
return
n
}
// same as beego.Post
//
Post
same as beego.Post
// refer: https://godoc.org/github.com/astaxie/beego#Post
func
(
n
*
Namespace
)
Post
(
rootpath
string
,
f
FilterFunc
)
*
Namespace
{
n
.
handlers
.
Post
(
rootpath
,
f
)
return
n
}
// same as beego.Delete
//
Delete
same as beego.Delete
// refer: https://godoc.org/github.com/astaxie/beego#Delete
func
(
n
*
Namespace
)
Delete
(
rootpath
string
,
f
FilterFunc
)
*
Namespace
{
n
.
handlers
.
Delete
(
rootpath
,
f
)
return
n
}
// same as beego.Put
//
Put
same as beego.Put
// refer: https://godoc.org/github.com/astaxie/beego#Put
func
(
n
*
Namespace
)
Put
(
rootpath
string
,
f
FilterFunc
)
*
Namespace
{
n
.
handlers
.
Put
(
rootpath
,
f
)
return
n
}
// same as beego.Head
//
Head
same as beego.Head
// refer: https://godoc.org/github.com/astaxie/beego#Head
func
(
n
*
Namespace
)
Head
(
rootpath
string
,
f
FilterFunc
)
*
Namespace
{
n
.
handlers
.
Head
(
rootpath
,
f
)
return
n
}
// same as beego.Options
//
Options
same as beego.Options
// refer: https://godoc.org/github.com/astaxie/beego#Options
func
(
n
*
Namespace
)
Options
(
rootpath
string
,
f
FilterFunc
)
*
Namespace
{
n
.
handlers
.
Options
(
rootpath
,
f
)
return
n
}
// same as beego.Patch
//
Patch
same as beego.Patch
// refer: https://godoc.org/github.com/astaxie/beego#Patch
func
(
n
*
Namespace
)
Patch
(
rootpath
string
,
f
FilterFunc
)
*
Namespace
{
n
.
handlers
.
Patch
(
rootpath
,
f
)
return
n
}
// same as beego.Any
//
Any
same as beego.Any
// refer: https://godoc.org/github.com/astaxie/beego#Any
func
(
n
*
Namespace
)
Any
(
rootpath
string
,
f
FilterFunc
)
*
Namespace
{
n
.
handlers
.
Any
(
rootpath
,
f
)
return
n
}
// same as beego.Handler
//
Handler
same as beego.Handler
// refer: https://godoc.org/github.com/astaxie/beego#Handler
func
(
n
*
Namespace
)
Handler
(
rootpath
string
,
h
http
.
Handler
)
*
Namespace
{
n
.
handlers
.
Handler
(
rootpath
,
h
)
return
n
}
// add include class
//
Include
add include class
// refer: https://godoc.org/github.com/astaxie/beego#Include
func
(
n
*
Namespace
)
Include
(
cList
...
ControllerInterface
)
*
Namespace
{
n
.
handlers
.
Include
(
cList
...
)
return
n
}
// nest Namespace
//
Namespace add
nest Namespace
// usage:
//ns := beego.NewNamespace(“/v1”).
//Namespace(
...
...
@@ -230,7 +231,7 @@ func (n *Namespace) Namespace(ns ...*Namespace) *Namespace {
return
n
}
// register Namespace into beego.Handler
//
AddNamespace
register Namespace into beego.Handler
// support multi Namespace
func
AddNamespace
(
nl
...*
Namespace
)
{
for
_
,
n
:=
range
nl
{
...
...
@@ -275,113 +276,113 @@ func addPrefix(t *Tree, prefix string) {
}
// Namespace Condition
func
NSCond
(
cond
namespaceCond
)
inner
Namespace
{
// N
SCond is N
amespace Condition
func
NSCond
(
cond
namespaceCond
)
Link
Namespace
{
return
func
(
ns
*
Namespace
)
{
ns
.
Cond
(
cond
)
}
}
// Namespace BeforeRouter filter
func
NSBefore
(
filiterList
...
FilterFunc
)
inner
Namespace
{
// N
SBefore N
amespace BeforeRouter filter
func
NSBefore
(
filiterList
...
FilterFunc
)
Link
Namespace
{
return
func
(
ns
*
Namespace
)
{
ns
.
Filter
(
"before"
,
filiterList
...
)
}
}
// Namespace FinishRouter filter
func
NSAfter
(
filiterList
...
FilterFunc
)
inner
Namespace
{
// N
SAfter add N
amespace FinishRouter filter
func
NSAfter
(
filiterList
...
FilterFunc
)
Link
Namespace
{
return
func
(
ns
*
Namespace
)
{
ns
.
Filter
(
"after"
,
filiterList
...
)
}
}
// Namespace Include ControllerInterface
func
NSInclude
(
cList
...
ControllerInterface
)
inner
Namespace
{
// N
SInclude N
amespace Include ControllerInterface
func
NSInclude
(
cList
...
ControllerInterface
)
Link
Namespace
{
return
func
(
ns
*
Namespace
)
{
ns
.
Include
(
cList
...
)
}
}
// Namespace Router
func
NSRouter
(
rootpath
string
,
c
ControllerInterface
,
mappingMethods
...
string
)
inner
Namespace
{
// N
SRouter call N
amespace Router
func
NSRouter
(
rootpath
string
,
c
ControllerInterface
,
mappingMethods
...
string
)
Link
Namespace
{
return
func
(
ns
*
Namespace
)
{
ns
.
Router
(
rootpath
,
c
,
mappingMethods
...
)
}
}
// Namespace Get
func
NSGet
(
rootpath
string
,
f
FilterFunc
)
inner
Namespace
{
// N
SGet call N
amespace Get
func
NSGet
(
rootpath
string
,
f
FilterFunc
)
Link
Namespace
{
return
func
(
ns
*
Namespace
)
{
ns
.
Get
(
rootpath
,
f
)
}
}
// Namespace Post
func
NSPost
(
rootpath
string
,
f
FilterFunc
)
inner
Namespace
{
// N
SPost call N
amespace Post
func
NSPost
(
rootpath
string
,
f
FilterFunc
)
Link
Namespace
{
return
func
(
ns
*
Namespace
)
{
ns
.
Post
(
rootpath
,
f
)
}
}
// Namespace Head
func
NSHead
(
rootpath
string
,
f
FilterFunc
)
inner
Namespace
{
// N
SHead call N
amespace Head
func
NSHead
(
rootpath
string
,
f
FilterFunc
)
Link
Namespace
{
return
func
(
ns
*
Namespace
)
{
ns
.
Head
(
rootpath
,
f
)
}
}
// Namespace Put
func
NSPut
(
rootpath
string
,
f
FilterFunc
)
inner
Namespace
{
// N
SPut call N
amespace Put
func
NSPut
(
rootpath
string
,
f
FilterFunc
)
Link
Namespace
{
return
func
(
ns
*
Namespace
)
{
ns
.
Put
(
rootpath
,
f
)
}
}
// Namespace Delete
func
NSDelete
(
rootpath
string
,
f
FilterFunc
)
inner
Namespace
{
// N
SDelete call N
amespace Delete
func
NSDelete
(
rootpath
string
,
f
FilterFunc
)
Link
Namespace
{
return
func
(
ns
*
Namespace
)
{
ns
.
Delete
(
rootpath
,
f
)
}
}
// Namespace Any
func
NSAny
(
rootpath
string
,
f
FilterFunc
)
inner
Namespace
{
// N
SAny call N
amespace Any
func
NSAny
(
rootpath
string
,
f
FilterFunc
)
Link
Namespace
{
return
func
(
ns
*
Namespace
)
{
ns
.
Any
(
rootpath
,
f
)
}
}
// Namespace Options
func
NSOptions
(
rootpath
string
,
f
FilterFunc
)
inner
Namespace
{
// N
SOptions call N
amespace Options
func
NSOptions
(
rootpath
string
,
f
FilterFunc
)
Link
Namespace
{
return
func
(
ns
*
Namespace
)
{
ns
.
Options
(
rootpath
,
f
)
}
}
// Namespace Patch
func
NSPatch
(
rootpath
string
,
f
FilterFunc
)
inner
Namespace
{
// N
SPatch call N
amespace Patch
func
NSPatch
(
rootpath
string
,
f
FilterFunc
)
Link
Namespace
{
return
func
(
ns
*
Namespace
)
{
ns
.
Patch
(
rootpath
,
f
)
}
}
//Namespace AutoRouter
func
NSAutoRouter
(
c
ControllerInterface
)
inner
Namespace
{
//
NSAutoRouter call
Namespace AutoRouter
func
NSAutoRouter
(
c
ControllerInterface
)
Link
Namespace
{
return
func
(
ns
*
Namespace
)
{
ns
.
AutoRouter
(
c
)
}
}
// Namespace AutoPrefix
func
NSAutoPrefix
(
prefix
string
,
c
ControllerInterface
)
inner
Namespace
{
// N
SAutoPrefix call N
amespace AutoPrefix
func
NSAutoPrefix
(
prefix
string
,
c
ControllerInterface
)
Link
Namespace
{
return
func
(
ns
*
Namespace
)
{
ns
.
AutoPrefix
(
prefix
,
c
)
}
}
// Namespace add sub Namespace
func
NSNamespace
(
prefix
string
,
params
...
innerNamespace
)
inner
Namespace
{
// N
SN
amespace add sub Namespace
func
NSNamespace
(
prefix
string
,
params
...
LinkNamespace
)
Link
Namespace
{
return
func
(
ns
*
Namespace
)
{
n
:=
NewNamespace
(
prefix
,
params
...
)
ns
.
Namespace
(
n
)
...
...
router.go
View file @
67b36d7c
...
...
@@ -770,10 +770,10 @@ func (p *ControllerRegister) ServeHTTP(rw http.ResponseWriter, r *http.Request)
//if XSRF is Enable then check cookie where there has any cookie in the request's cookie _csrf
if
EnableXSRF
{
execController
.
X
srf
Token
()
execController
.
X
SRF
Token
()
if
r
.
Method
==
"POST"
||
r
.
Method
==
"DELETE"
||
r
.
Method
==
"PUT"
||
(
r
.
Method
==
"POST"
&&
(
context
.
Input
.
Query
(
"_method"
)
==
"DELETE"
||
context
.
Input
.
Query
(
"_method"
)
==
"PUT"
))
{
execController
.
CheckX
srf
Cookie
()
execController
.
CheckX
SRF
Cookie
()
}
}
...
...
router_test.go
View file @
67b36d7c
...
...
@@ -53,7 +53,7 @@ func (tc *TestController) Myext() {
}
func
(
tc
*
TestController
)
GetUrl
()
{
tc
.
Ctx
.
Output
.
Body
([]
byte
(
tc
.
U
rl
For
(
".Myext"
)))
tc
.
Ctx
.
Output
.
Body
([]
byte
(
tc
.
U
RL
For
(
".Myext"
)))
}
func
(
t
*
TestController
)
GetParams
()
{
...
...
@@ -76,7 +76,7 @@ type JsonController struct {
func
(
this
*
JsonController
)
Prepare
()
{
this
.
Data
[
"json"
]
=
"prepare"
this
.
ServeJ
son
(
true
)
this
.
ServeJ
SON
(
true
)
}
func
(
this
*
JsonController
)
Get
()
{
...
...
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