1
0
mirror of https://github.com/beego/bee.git synced 2025-06-11 18:40:40 +00:00

using beego v2

This commit is contained in:
Ming Deng
2020-12-14 13:08:47 +08:00
parent 9d68c302bd
commit cdb41fad3f
16 changed files with 38 additions and 38 deletions

View File

@ -76,7 +76,7 @@ var apiMaingo = `package main
import (
_ "{{.Appname}}/routers"
beego "github.com/beego/beego/server/web"
beego "github.com/beego/beego/v2/server/web"
)
func main() {
@ -93,8 +93,8 @@ var apiMainconngo = `package main
import (
_ "{{.Appname}}/routers"
beego "github.com/beego/beego/server/web"
"github.com/beego/beego/client/orm"
beego "github.com/beego/beego/v2/server/web"
"github.com/beego/beego/v2/client/orm"
{{.DriverPkg}}
)
@ -113,7 +113,7 @@ module %s
go %s
require github.com/beego/beego %s
require github.com/beego/beego/v2 %s
require github.com/smartystreets/goconvey v1.6.4
`
@ -129,7 +129,7 @@ package routers
import (
"{{.Appname}}/controllers"
beego "github.com/beego/beego/server/web"
beego "github.com/beego/beego/v2/server/web"
)
func init() {
@ -298,7 +298,7 @@ import (
"{{.Appname}}/models"
"encoding/json"
beego "github.com/beego/beego/server/web"
beego "github.com/beego/beego/v2/server/web"
)
// Operations about object
@ -391,7 +391,7 @@ import (
"{{.Appname}}/models"
"encoding/json"
beego "github.com/beego/beego/server/web"
beego "github.com/beego/beego/v2/server/web"
)
// Operations about Users
@ -516,8 +516,8 @@ import (
"path/filepath"
_ "{{.Appname}}/routers"
beego "github.com/beego/beego/server/web"
"github.com/beego/beego/core/logs"
beego "github.com/beego/beego/v2/server/web"
"github.com/beego/beego/v2/core/logs"
. "github.com/smartystreets/goconvey/convey"
)

View File

@ -49,7 +49,7 @@ module %s
go %s
require github.com/beego/beego %s
require github.com/beego/beego/v2 %s
require github.com/smartystreets/goconvey v1.6.4
`

View File

@ -366,8 +366,8 @@ const (
import(
"os"
"github.com/beego/beego/client/orm"
"github.com/beego/beego/client/orm/migration"
"github.com/beego/beego/v2/client/orm"
"github.com/beego/beego/v2/client/orm/migration"
_ "{{DriverRepo}}"
)

View File

@ -70,7 +70,7 @@ var maingo = `package main
import (
_ "{{.Appname}}/routers"
beego "github.com/beego/beego/server/web"
beego "github.com/beego/beego/v2/server/web"
)
func main() {
@ -82,7 +82,7 @@ var router = `package routers
import (
"{{.Appname}}/controllers"
beego "github.com/beego/beego/server/web"
beego "github.com/beego/beego/v2/server/web"
)
func init() {
@ -93,7 +93,7 @@ var goMod = `module %s
go %s
require github.com/beego/beego %s
require github.com/beego/beego/v2 %s
require github.com/smartystreets/goconvey v1.6.4
`
var test = `package test
@ -106,7 +106,7 @@ import (
"path/filepath"
_ "{{.Appname}}/routers"
beego "github.com/beego/beego/server/web"
beego "github.com/beego/beego/v2/server/web"
. "github.com/smartystreets/goconvey/convey"
)
@ -140,7 +140,7 @@ func TestBeego(t *testing.T) {
var controllers = `package controllers
import (
beego "github.com/beego/beego/server/web"
beego "github.com/beego/beego/v2/server/web"
)
type MainController struct {

View File

@ -161,7 +161,7 @@ func GetBeegoVersion() string {
}
}
return "Beego is not installed. Please do consider installing it first: https://github.com/beego/beego. " +
return "Beego is not installed. Please do consider installing it first: https://github.com/beego/beego/v2. " +
"If you are using go mod, and you don't install the beego under $GOPATH/src/github.com/astaxie, just ignore this."
}