mirror of
https://github.com/beego/bee.git
synced 2024-11-22 10:10:53 +00:00
routers
This commit is contained in:
parent
2ff8323c11
commit
3492059429
10
apiapp.go
10
apiapp.go
@ -57,7 +57,7 @@ copyrequestbody = true
|
|||||||
var apiMaingo = `package main
|
var apiMaingo = `package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
_ "{{.Appname}}/routes"
|
_ "{{.Appname}}/routers"
|
||||||
"github.com/astaxie/beego"
|
"github.com/astaxie/beego"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ func main() {
|
|||||||
beego.Run()
|
beego.Run()
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
var apirouter = `package routes
|
var apirouter = `package routers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"{{.Appname}}/controllers"
|
"{{.Appname}}/controllers"
|
||||||
@ -200,10 +200,6 @@ func (this *ObjectController) Delete() {
|
|||||||
this.ServeJson()
|
this.ServeJson()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *ObjectController) Ping() {
|
|
||||||
this.Ctx.WriteString("pong")
|
|
||||||
}
|
|
||||||
|
|
||||||
`
|
`
|
||||||
|
|
||||||
var apiTests = `package test
|
var apiTests = `package test
|
||||||
@ -212,7 +208,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"testing"
|
"testing"
|
||||||
_ "{{.Appname}}/routes"
|
_ "{{.Appname}}/routers"
|
||||||
|
|
||||||
"github.com/astaxie/beego"
|
"github.com/astaxie/beego"
|
||||||
. "github.com/smartystreets/goconvey/convey"
|
. "github.com/smartystreets/goconvey/convey"
|
||||||
|
6
new.go
6
new.go
@ -149,7 +149,7 @@ runmode = dev
|
|||||||
var maingo = `package main
|
var maingo = `package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
_ "{{.Appname}}/routes"
|
_ "{{.Appname}}/routers"
|
||||||
"github.com/astaxie/beego"
|
"github.com/astaxie/beego"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -158,7 +158,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
`
|
`
|
||||||
var router = `package routes
|
var router = `package routers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"{{.Appname}}/controllers"
|
"{{.Appname}}/controllers"
|
||||||
@ -176,7 +176,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"testing"
|
"testing"
|
||||||
_ "{{.Appname}}/routes"
|
_ "{{.Appname}}/routers"
|
||||||
|
|
||||||
"github.com/astaxie/beego"
|
"github.com/astaxie/beego"
|
||||||
. "github.com/smartystreets/goconvey/convey"
|
. "github.com/smartystreets/goconvey/convey"
|
||||||
|
Loading…
Reference in New Issue
Block a user