mirror of
https://github.com/beego/bee.git
synced 2025-06-11 18:40:40 +00:00
using beego to rerwite all commands
This commit is contained in:
@ -51,6 +51,8 @@ func IfGenerateDocs(name string, args []string) bool {
|
||||
|
||||
var usageTemplate = `Bee is a Fast and Flexible tool for managing your Beego Web Application.
|
||||
|
||||
You are using bee for beego v2.x. If you are working on beego v1.x, please downgrade version to bee v1.12.0
|
||||
|
||||
{{"USAGE" | headline}}
|
||||
{{"bee command [arguments]" | bold}}
|
||||
|
||||
|
@ -76,7 +76,7 @@ var apiMaingo = `package main
|
||||
import (
|
||||
_ "{{.Appname}}/routers"
|
||||
|
||||
"github.com/astaxie/beego"
|
||||
beego "github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@ -93,8 +93,8 @@ var apiMainconngo = `package main
|
||||
import (
|
||||
_ "{{.Appname}}/routers"
|
||||
|
||||
"github.com/astaxie/beego"
|
||||
"github.com/astaxie/beego/orm"
|
||||
beego "github.com/astaxie/beego/server/web"
|
||||
"github.com/astaxie/beego/client/orm"
|
||||
{{.DriverPkg}}
|
||||
)
|
||||
|
||||
@ -129,7 +129,7 @@ package routers
|
||||
import (
|
||||
"{{.Appname}}/controllers"
|
||||
|
||||
"github.com/astaxie/beego"
|
||||
beego "github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@ -298,7 +298,7 @@ import (
|
||||
"{{.Appname}}/models"
|
||||
"encoding/json"
|
||||
|
||||
"github.com/astaxie/beego"
|
||||
beego "github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
// Operations about object
|
||||
@ -391,7 +391,7 @@ import (
|
||||
"{{.Appname}}/models"
|
||||
"encoding/json"
|
||||
|
||||
"github.com/astaxie/beego"
|
||||
beego "github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
// Operations about Users
|
||||
@ -516,7 +516,8 @@ import (
|
||||
"path/filepath"
|
||||
_ "{{.Appname}}/routers"
|
||||
|
||||
"github.com/astaxie/beego"
|
||||
beego "github.com/astaxie/beego/server/web"
|
||||
"github.com/astaxie/beego/core/logs"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
)
|
||||
|
||||
@ -532,7 +533,7 @@ func TestGet(t *testing.T) {
|
||||
w := httptest.NewRecorder()
|
||||
beego.BeeApp.Handlers.ServeHTTP(w, r)
|
||||
|
||||
beego.Trace("testing", "TestGet", "Code[%d]\n%s", w.Code, w.Body.String())
|
||||
logs.Info("testing", "TestGet", "Code[%d]\n%s", w.Code, w.Body.String())
|
||||
|
||||
Convey("Subject: Test Station Endpoint\n", t, func() {
|
||||
Convey("Status Code Should Be 200", func() {
|
||||
|
@ -366,8 +366,8 @@ const (
|
||||
import(
|
||||
"os"
|
||||
|
||||
"github.com/astaxie/beego/orm"
|
||||
"github.com/astaxie/beego/migration"
|
||||
"github.com/astaxie/beego/client/orm"
|
||||
"github.com/astaxie/beego/client/orm/migration"
|
||||
|
||||
_ "{{DriverRepo}}"
|
||||
)
|
||||
|
@ -161,7 +161,8 @@ func GetBeegoVersion() string {
|
||||
}
|
||||
|
||||
}
|
||||
return "Beego is not installed. Please do consider installing it first: https://github.com/astaxie/beego"
|
||||
return "Beego is not installed. Please do consider installing it first: https://github.com/astaxie/beego. " +
|
||||
"If you are using go mod, and you don't install the beego under $GOPATH/src/github.com/astaxie, just ignore this."
|
||||
}
|
||||
|
||||
func GetGoVersion() string {
|
||||
|
Reference in New Issue
Block a user