1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-01 03:30:17 +00:00

change this to short name

This commit is contained in:
astaxie
2014-11-05 22:40:31 +08:00
parent 950ff91d87
commit 54ba307f7f
5 changed files with 44 additions and 44 deletions

View File

@ -27,33 +27,33 @@ type TestController struct {
Controller
}
func (this *TestController) Get() {
this.Data["Username"] = "astaxie"
this.Ctx.Output.Body([]byte("ok"))
func (tc *TestController) Get() {
tc.Data["Username"] = "astaxie"
tc.Ctx.Output.Body([]byte("ok"))
}
func (this *TestController) Post() {
this.Ctx.Output.Body([]byte(this.Ctx.Input.Query(":name")))
func (tc *TestController) Post() {
tc.Ctx.Output.Body([]byte(tc.Ctx.Input.Query(":name")))
}
func (this *TestController) Param() {
this.Ctx.Output.Body([]byte(this.Ctx.Input.Query(":name")))
func (tc *TestController) Param() {
tc.Ctx.Output.Body([]byte(tc.Ctx.Input.Query(":name")))
}
func (this *TestController) List() {
this.Ctx.Output.Body([]byte("i am list"))
func (tc *TestController) List() {
tc.Ctx.Output.Body([]byte("i am list"))
}
func (this *TestController) Params() {
this.Ctx.Output.Body([]byte(this.Ctx.Input.Params["0"] + this.Ctx.Input.Params["1"] + this.Ctx.Input.Params["2"]))
func (tc *TestController) Params() {
tc.Ctx.Output.Body([]byte(tc.Ctx.Input.Params["0"] + tc.Ctx.Input.Params["1"] + tc.Ctx.Input.Params["2"]))
}
func (this *TestController) Myext() {
this.Ctx.Output.Body([]byte(this.Ctx.Input.Param(":ext")))
func (tc *TestController) Myext() {
tc.Ctx.Output.Body([]byte(tc.Ctx.Input.Param(":ext")))
}
func (this *TestController) GetUrl() {
this.Ctx.Output.Body([]byte(this.UrlFor(".Myext")))
func (tc *TestController) GetUrl() {
tc.Ctx.Output.Body([]byte(tc.UrlFor(".Myext")))
}
func (t *TestController) GetParams() {