1
0
mirror of https://github.com/beego/bee.git synced 2025-06-13 01:30:39 +00:00

using beego to rerwite all commands

This commit is contained in:
Ming Deng
2020-11-05 23:52:08 +08:00
parent fa7aee4d01
commit f2a93c8c75
13 changed files with 161 additions and 45 deletions

View File

@ -1023,7 +1023,7 @@ import (
"reflect"
"strings"
{{timePkg}}
"github.com/astaxie/beego/orm"
"github.com/astaxie/beego/client/orm"
)
{{modelStruct}}
@ -1172,7 +1172,7 @@ import (
"strconv"
"strings"
"github.com/astaxie/beego"
beego "github.com/astaxie/beego/server/web"
)
// {{ctrlName}}Controller operations for {{ctrlName}}
@ -1347,7 +1347,7 @@ package routers
import (
"{{pkgPath}}/controllers"
"github.com/astaxie/beego"
beego "github.com/astaxie/beego/server/web"
)
func init() {

View File

@ -78,7 +78,7 @@ func GenerateController(cname, currpath string) {
var controllerTpl = `package {{packageName}}
import (
"github.com/astaxie/beego"
beego "github.com/astaxie/beego/server/web"
)
// {{controllerName}}Controller operations for {{controllerName}}
@ -166,7 +166,7 @@ import (
"strconv"
"strings"
"github.com/astaxie/beego"
beego "github.com/astaxie/beego/server/web"
)
// {{controllerName}}Controller operations for {{controllerName}}

View File

@ -47,7 +47,7 @@ import (
"{{.Appname}}/models"
"github.com/hprose/hprose-golang/rpc"
"github.com/astaxie/beego"
beego "github.com/astaxie/beego/server/web"
)
func logInvokeHandler(
@ -90,8 +90,8 @@ import (
"{{.Appname}}/models"
"github.com/hprose/hprose-golang/rpc"
"github.com/astaxie/beego"
"github.com/astaxie/beego/orm"
beego "github.com/astaxie/beego/server/web"
"github.com/astaxie/beego/client/orm"
{{.DriverPkg}}
)
@ -419,7 +419,7 @@ import (
"reflect"
"strings"
{{timePkg}}
"github.com/astaxie/beego/orm"
"github.com/astaxie/beego/client/orm"
)
{{modelStruct}}

View File

@ -238,7 +238,7 @@ func GenerateMigration(mname, upsql, downsql, curpath string) {
const (
MigrationHeader = `package main
import (
"github.com/astaxie/beego/migration"
"github.com/astaxie/beego/client/orm/migration"
)
// DO NOT MODIFY

View File

@ -145,7 +145,7 @@ import (
"reflect"
"strings"
{{timePkg}}
"github.com/astaxie/beego/orm"
"github.com/astaxie/beego/client/orm"
)
{{modelStruct}}

View File

@ -35,8 +35,8 @@ import (
yaml "gopkg.in/yaml.v2"
"github.com/astaxie/beego/swagger"
"github.com/astaxie/beego/utils"
"github.com/astaxie/beego/server/web/swagger"
"github.com/astaxie/beego/core/utils"
beeLogger "github.com/beego/bee/logger"
)
@ -429,7 +429,7 @@ func analyseControllerPkg(localName, pkgpath string) {
if isSystemPackage(pkgpath) {
return
}
if pkgpath == "github.com/astaxie/beego" {
if pkgpath == "github.com/astaxie/beego/server/web" {
return
}
if localName != "" {