mirror of
https://github.com/beego/bee.git
synced 2024-11-23 06:40:54 +00:00
commit
3b2304a480
2
Makefile
2
Makefile
@ -24,6 +24,6 @@ clean:
|
||||
publish:
|
||||
mkdir -p bin/$(VERSION)
|
||||
cd bin/$(VERSION)
|
||||
xgo -v -x --targets="windows/*,darwin/*,linux/386,linux/amd64,linux/arm-5,linux/arm64" -out bee_$(VERSION) github.com/beego/bee
|
||||
xgo -v -x --targets="windows/*,darwin/*,linux/386,linux/amd64,linux/arm-5,linux/arm64" -out bee_$(VERSION) github.com/beego/bee/v2
|
||||
cd ..
|
||||
ghr -u beego -r bee $(VERSION) $(VERSION)
|
||||
|
@ -16,7 +16,7 @@ Bee is a command-line tool facilitating development of Beego-based application.
|
||||
To install `bee` use the `go get` command:
|
||||
|
||||
```bash
|
||||
go get github.com/beego/bee
|
||||
go get github.com/beego/bee/v2
|
||||
```
|
||||
|
||||
Then you can add `bee` binary to PATH environment variable in your `~/.bashrc` or `~/.bash_profile` file:
|
||||
@ -28,7 +28,7 @@ export PATH=$PATH:<your_main_gopath>/bin
|
||||
> If you already have `bee` installed, updating `bee` is simple:
|
||||
|
||||
```bash
|
||||
go get -u github.com/beego/bee
|
||||
go get -u github.com/beego/bee/v2
|
||||
```
|
||||
|
||||
## Basic commands
|
||||
|
38
cmd/bee.go
38
cmd/bee.go
@ -16,25 +16,25 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"github.com/beego/bee/cmd/commands"
|
||||
_ "github.com/beego/bee/cmd/commands/api"
|
||||
_ "github.com/beego/bee/cmd/commands/bale"
|
||||
_ "github.com/beego/bee/cmd/commands/beefix"
|
||||
_ "github.com/beego/bee/cmd/commands/beegopro"
|
||||
_ "github.com/beego/bee/cmd/commands/dev"
|
||||
_ "github.com/beego/bee/cmd/commands/dlv"
|
||||
_ "github.com/beego/bee/cmd/commands/dockerize"
|
||||
_ "github.com/beego/bee/cmd/commands/generate"
|
||||
_ "github.com/beego/bee/cmd/commands/hprose"
|
||||
_ "github.com/beego/bee/cmd/commands/migrate"
|
||||
_ "github.com/beego/bee/cmd/commands/new"
|
||||
_ "github.com/beego/bee/cmd/commands/pack"
|
||||
_ "github.com/beego/bee/cmd/commands/rs"
|
||||
_ "github.com/beego/bee/cmd/commands/run"
|
||||
_ "github.com/beego/bee/cmd/commands/server"
|
||||
_ "github.com/beego/bee/cmd/commands/update"
|
||||
_ "github.com/beego/bee/cmd/commands/version"
|
||||
"github.com/beego/bee/utils"
|
||||
"github.com/beego/bee/v2/cmd/commands"
|
||||
_ "github.com/beego/bee/v2/cmd/commands/api"
|
||||
_ "github.com/beego/bee/v2/cmd/commands/bale"
|
||||
_ "github.com/beego/bee/v2/cmd/commands/beefix"
|
||||
_ "github.com/beego/bee/v2/cmd/commands/beegopro"
|
||||
_ "github.com/beego/bee/v2/cmd/commands/dev"
|
||||
_ "github.com/beego/bee/v2/cmd/commands/dlv"
|
||||
_ "github.com/beego/bee/v2/cmd/commands/dockerize"
|
||||
_ "github.com/beego/bee/v2/cmd/commands/generate"
|
||||
_ "github.com/beego/bee/v2/cmd/commands/hprose"
|
||||
_ "github.com/beego/bee/v2/cmd/commands/migrate"
|
||||
_ "github.com/beego/bee/v2/cmd/commands/new"
|
||||
_ "github.com/beego/bee/v2/cmd/commands/pack"
|
||||
_ "github.com/beego/bee/v2/cmd/commands/rs"
|
||||
_ "github.com/beego/bee/v2/cmd/commands/run"
|
||||
_ "github.com/beego/bee/v2/cmd/commands/server"
|
||||
_ "github.com/beego/bee/v2/cmd/commands/update"
|
||||
_ "github.com/beego/bee/v2/cmd/commands/version"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
)
|
||||
|
||||
func IfGenerateDocs(name string, args []string) bool {
|
||||
|
@ -20,13 +20,13 @@ import (
|
||||
path "path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/beego/bee/logger/colors"
|
||||
"github.com/beego/bee/v2/logger/colors"
|
||||
|
||||
"github.com/beego/bee/cmd/commands"
|
||||
"github.com/beego/bee/cmd/commands/version"
|
||||
"github.com/beego/bee/generate"
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/utils"
|
||||
"github.com/beego/bee/v2/cmd/commands"
|
||||
"github.com/beego/bee/v2/cmd/commands/version"
|
||||
"github.com/beego/bee/v2/generate"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
)
|
||||
|
||||
var CmdApiapp = &commands.Command{
|
||||
|
@ -24,11 +24,11 @@ import (
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/beego/bee/cmd/commands"
|
||||
"github.com/beego/bee/cmd/commands/version"
|
||||
"github.com/beego/bee/config"
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/utils"
|
||||
"github.com/beego/bee/v2/cmd/commands"
|
||||
"github.com/beego/bee/v2/cmd/commands/version"
|
||||
"github.com/beego/bee/v2/config"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
)
|
||||
|
||||
var CmdBale = &commands.Command{
|
||||
|
@ -3,10 +3,10 @@ package beefix
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/beego/bee/cmd/commands"
|
||||
"github.com/beego/bee/cmd/commands/version"
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/utils"
|
||||
"github.com/beego/bee/v2/cmd/commands"
|
||||
"github.com/beego/bee/v2/cmd/commands/version"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
)
|
||||
|
||||
var CmdFix = &commands.Command{
|
||||
@ -36,7 +36,7 @@ func init() {
|
||||
|
||||
func runFix(cmd *commands.Command, args []string) int {
|
||||
t := target.String()
|
||||
if t == "" || t == "1.6"{
|
||||
if t == "" || t == "1.6" {
|
||||
return fixTo16(cmd, args)
|
||||
} else if strings.HasPrefix(t, "2") {
|
||||
// upgrade to v2
|
||||
|
@ -18,20 +18,32 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
)
|
||||
|
||||
func fix1To2() int {
|
||||
beeLogger.Log.Info("Upgrading the application...")
|
||||
|
||||
cmdStr := `find ./ -name '*.go' -type f -exec sed -i '' -e 's/github.com\/astaxie\/beego/github.com\/beego\/beego\/v2\/adapter/g' {} \;`
|
||||
cmdStr := `go get -u github.com/beego/beego/v2@develop`
|
||||
err := runShell(cmdStr)
|
||||
if err != nil {
|
||||
beeLogger.Log.Error(err.Error())
|
||||
beeLogger.Log.Error(`fetch v2.0.1 failed. Please try to run: export GO111MODULE=on
|
||||
and if your network is not stable, please try to use proxy, for example: export GOPROXY=https://goproxy.cn;'
|
||||
`)
|
||||
return 1
|
||||
}
|
||||
|
||||
cmdStr = `find ./ -name '*.go' -type f -exec sed -i '' -e 's/github.com\/astaxie\/beego/github.com\/beego\/beego\/v2\/adapter/g' {} \;`
|
||||
err = runShell(cmdStr)
|
||||
if err != nil {
|
||||
beeLogger.Log.Error(err.Error())
|
||||
return 1
|
||||
}
|
||||
cmdStr = `find ./ -name '*.go' -type f -exec sed -i '' -e 's/"github.com\/beego\/beego\/v2\/adapter"/beego "github.com\/beego\/beego\/v2\/adapter"/g' {} \;`
|
||||
err = runShell(cmdStr)
|
||||
if err != nil {
|
||||
beeLogger.Log.Error(err.Error())
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
|
@ -24,9 +24,9 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/beego/bee/cmd/commands"
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/logger/colors"
|
||||
"github.com/beego/bee/v2/cmd/commands"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
"github.com/beego/bee/v2/logger/colors"
|
||||
)
|
||||
|
||||
// fixTo16 upgrade beego to 1.6
|
||||
@ -228,4 +228,3 @@ func fixFile(file string) error {
|
||||
}
|
||||
return ioutil.WriteFile(file, []byte(fixed), 0666)
|
||||
}
|
||||
|
||||
|
@ -16,9 +16,9 @@ package beegopro
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/beego/bee/cmd/commands"
|
||||
"github.com/beego/bee/internal/app/module/beegopro"
|
||||
"github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/v2/cmd/commands"
|
||||
"github.com/beego/bee/v2/internal/app/module/beegopro"
|
||||
"github.com/beego/bee/v2/logger"
|
||||
)
|
||||
|
||||
var CmdBeegoPro = &commands.Command{
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/beego/bee/logger/colors"
|
||||
"github.com/beego/bee/utils"
|
||||
"github.com/beego/bee/v2/logger/colors"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
)
|
||||
|
||||
// Command is the unit of execution
|
||||
|
@ -15,8 +15,8 @@
|
||||
package dev
|
||||
|
||||
import (
|
||||
"github.com/beego/bee/cmd/commands"
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/v2/cmd/commands"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
)
|
||||
|
||||
var CmdDev = &commands.Command{
|
||||
|
@ -17,7 +17,7 @@ package dev
|
||||
import (
|
||||
"os"
|
||||
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
)
|
||||
|
||||
var preCommit = `
|
||||
|
@ -24,16 +24,16 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/beego/bee/cmd/commands"
|
||||
"github.com/beego/bee/cmd/commands/version"
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/utils"
|
||||
"github.com/beego/bee/v2/cmd/commands"
|
||||
"github.com/beego/bee/v2/cmd/commands/version"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
"github.com/fsnotify/fsnotify"
|
||||
"github.com/go-delve/delve/pkg/terminal"
|
||||
"github.com/go-delve/delve/service"
|
||||
"github.com/go-delve/delve/service/debugger"
|
||||
"github.com/go-delve/delve/service/rpc2"
|
||||
"github.com/go-delve/delve/service/rpccommon"
|
||||
"github.com/go-delve/delve/pkg/terminal"
|
||||
"github.com/fsnotify/fsnotify"
|
||||
)
|
||||
|
||||
var cmdDlv = &commands.Command{
|
||||
|
@ -22,10 +22,10 @@ import (
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
"github.com/beego/bee/cmd/commands"
|
||||
"github.com/beego/bee/cmd/commands/version"
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/utils"
|
||||
"github.com/beego/bee/v2/cmd/commands"
|
||||
"github.com/beego/bee/v2/cmd/commands/version"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
)
|
||||
|
||||
const dockerBuildTemplate = `FROM {{.BaseImage}}
|
||||
|
@ -17,13 +17,13 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/beego/bee/cmd/commands"
|
||||
"github.com/beego/bee/cmd/commands/version"
|
||||
"github.com/beego/bee/config"
|
||||
"github.com/beego/bee/generate"
|
||||
"github.com/beego/bee/generate/swaggergen"
|
||||
"github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/utils"
|
||||
"github.com/beego/bee/v2/cmd/commands"
|
||||
"github.com/beego/bee/v2/cmd/commands/version"
|
||||
"github.com/beego/bee/v2/config"
|
||||
"github.com/beego/bee/v2/generate"
|
||||
"github.com/beego/bee/v2/generate/swaggergen"
|
||||
"github.com/beego/bee/v2/logger"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
)
|
||||
|
||||
var CmdGenerate = &commands.Command{
|
||||
|
@ -6,14 +6,14 @@ import (
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/beego/bee/logger/colors"
|
||||
"github.com/beego/bee/v2/logger/colors"
|
||||
|
||||
"github.com/beego/bee/cmd/commands"
|
||||
"github.com/beego/bee/cmd/commands/api"
|
||||
"github.com/beego/bee/cmd/commands/version"
|
||||
"github.com/beego/bee/generate"
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/utils"
|
||||
"github.com/beego/bee/v2/cmd/commands"
|
||||
"github.com/beego/bee/v2/cmd/commands/api"
|
||||
"github.com/beego/bee/v2/cmd/commands/version"
|
||||
"github.com/beego/bee/v2/generate"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
)
|
||||
|
||||
var CmdHproseapp = &commands.Command{
|
||||
|
@ -23,12 +23,12 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/beego/bee/cmd/commands"
|
||||
"github.com/beego/bee/cmd/commands/version"
|
||||
"github.com/beego/bee/config"
|
||||
"github.com/beego/bee/utils"
|
||||
"github.com/beego/bee/v2/cmd/commands"
|
||||
"github.com/beego/bee/v2/cmd/commands/version"
|
||||
"github.com/beego/bee/v2/config"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
)
|
||||
|
||||
var CmdMigrate = &commands.Command{
|
||||
|
@ -20,11 +20,11 @@ import (
|
||||
path "path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/beego/bee/cmd/commands"
|
||||
"github.com/beego/bee/cmd/commands/version"
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/logger/colors"
|
||||
"github.com/beego/bee/utils"
|
||||
"github.com/beego/bee/v2/cmd/commands"
|
||||
"github.com/beego/bee/v2/cmd/commands/version"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
"github.com/beego/bee/v2/logger/colors"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
)
|
||||
|
||||
var gopath utils.DocValue
|
||||
|
@ -18,10 +18,10 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/beego/bee/cmd/commands"
|
||||
"github.com/beego/bee/cmd/commands/version"
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/utils"
|
||||
"github.com/beego/bee/v2/cmd/commands"
|
||||
"github.com/beego/bee/v2/cmd/commands/version"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
)
|
||||
|
||||
var CmdPack = &commands.Command{
|
||||
|
@ -24,12 +24,12 @@ import (
|
||||
|
||||
"strings"
|
||||
|
||||
"github.com/beego/bee/cmd/commands"
|
||||
"github.com/beego/bee/cmd/commands/version"
|
||||
"github.com/beego/bee/config"
|
||||
"github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/logger/colors"
|
||||
"github.com/beego/bee/utils"
|
||||
"github.com/beego/bee/v2/cmd/commands"
|
||||
"github.com/beego/bee/v2/cmd/commands/version"
|
||||
"github.com/beego/bee/v2/config"
|
||||
"github.com/beego/bee/v2/logger"
|
||||
"github.com/beego/bee/v2/logger/colors"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
)
|
||||
|
||||
var cmdRs = &commands.Command{
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
"github.com/gorilla/websocket"
|
||||
)
|
||||
|
||||
|
@ -20,11 +20,11 @@ import (
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/beego/bee/cmd/commands"
|
||||
"github.com/beego/bee/cmd/commands/version"
|
||||
"github.com/beego/bee/config"
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/utils"
|
||||
"github.com/beego/bee/v2/cmd/commands"
|
||||
"github.com/beego/bee/v2/cmd/commands/version"
|
||||
"github.com/beego/bee/v2/config"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
)
|
||||
|
||||
var CmdRun = &commands.Command{
|
||||
|
@ -24,10 +24,10 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/beego/bee/config"
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/logger/colors"
|
||||
"github.com/beego/bee/utils"
|
||||
"github.com/beego/bee/v2/config"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
"github.com/beego/bee/v2/logger/colors"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
"github.com/fsnotify/fsnotify"
|
||||
)
|
||||
|
||||
|
@ -17,13 +17,13 @@ package apiapp
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
|
||||
"os"
|
||||
|
||||
"github.com/beego/bee/cmd/commands"
|
||||
"github.com/beego/bee/cmd/commands/version"
|
||||
"github.com/beego/bee/utils"
|
||||
"github.com/beego/bee/v2/cmd/commands"
|
||||
"github.com/beego/bee/v2/cmd/commands/version"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
)
|
||||
|
||||
var CmdServer = &commands.Command{
|
||||
|
@ -5,16 +5,16 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
|
||||
"github.com/beego/bee/cmd/commands"
|
||||
"github.com/beego/bee/config"
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/v2/cmd/commands"
|
||||
"github.com/beego/bee/v2/config"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
)
|
||||
|
||||
var CmdUpdate = &commands.Command{
|
||||
UsageLine: "update",
|
||||
Short: "Update Bee",
|
||||
Long: `
|
||||
Automatic run command "go get -u github.com/beego/bee" for selfupdate
|
||||
Automatic run command "go get -u github.com/beego/bee/v2" for selfupdate
|
||||
`,
|
||||
Run: updateBee,
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
|
||||
"time"
|
||||
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
)
|
||||
|
||||
// RuntimeInfo holds information about the current runtime.
|
||||
|
@ -16,11 +16,11 @@ import (
|
||||
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
"github.com/beego/bee/cmd/commands"
|
||||
"github.com/beego/bee/config"
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/logger/colors"
|
||||
"github.com/beego/bee/utils"
|
||||
"github.com/beego/bee/v2/cmd/commands"
|
||||
"github.com/beego/bee/v2/config"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
"github.com/beego/bee/v2/logger/colors"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
)
|
||||
|
||||
const verboseVersionBanner string = `%s%s______
|
||||
|
@ -21,14 +21,14 @@ import (
|
||||
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
)
|
||||
|
||||
const confVer = 0
|
||||
|
||||
const (
|
||||
Version = "2.0.1"
|
||||
GitRemotePath = "github.com/beego/bee"
|
||||
GitRemotePath = "github.com/beego/bee/v2"
|
||||
)
|
||||
|
||||
var Conf = struct {
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
package generate
|
||||
|
||||
import "github.com/beego/bee/utils"
|
||||
import "github.com/beego/bee/v2/utils"
|
||||
|
||||
var SQLDriver utils.DocValue
|
||||
var SQLConn utils.DocValue
|
||||
|
@ -25,9 +25,9 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/logger/colors"
|
||||
"github.com/beego/bee/utils"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
"github.com/beego/bee/v2/logger/colors"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
_ "github.com/lib/pq"
|
||||
)
|
||||
|
@ -20,9 +20,9 @@ import (
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/logger/colors"
|
||||
"github.com/beego/bee/utils"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
"github.com/beego/bee/v2/logger/colors"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
)
|
||||
|
||||
func GenerateController(cname, currpath string) {
|
||||
|
@ -24,9 +24,9 @@ import (
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/logger/colors"
|
||||
"github.com/beego/bee/utils"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
"github.com/beego/bee/v2/logger/colors"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
_ "github.com/lib/pq"
|
||||
)
|
||||
|
@ -21,9 +21,9 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/logger/colors"
|
||||
"github.com/beego/bee/utils"
|
||||
"github.com/beego/bee/v2/logger"
|
||||
"github.com/beego/bee/v2/logger/colors"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -21,9 +21,9 @@ import (
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/logger/colors"
|
||||
"github.com/beego/bee/utils"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
"github.com/beego/bee/v2/logger/colors"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
)
|
||||
|
||||
func GenerateModel(mname, fields, currpath string) {
|
||||
|
@ -3,9 +3,9 @@ package generate
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/beego/bee/cmd/commands/migrate"
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/utils"
|
||||
"github.com/beego/bee/v2/cmd/commands/migrate"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
)
|
||||
|
||||
func GenerateScaffold(sname, fields, currpath, driver, conn string) {
|
||||
|
@ -19,9 +19,9 @@ import (
|
||||
"os"
|
||||
"path"
|
||||
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/logger/colors"
|
||||
"github.com/beego/bee/utils"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
"github.com/beego/bee/v2/logger/colors"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
)
|
||||
|
||||
// recipe
|
||||
|
@ -35,9 +35,9 @@ import (
|
||||
|
||||
yaml "gopkg.in/yaml.v2"
|
||||
|
||||
"github.com/beego/beego/v2/server/web/swagger"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
"github.com/beego/beego/v2/core/utils"
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/beego/v2/server/web/swagger"
|
||||
)
|
||||
|
||||
const (
|
||||
|
2
go.mod
2
go.mod
@ -1,4 +1,4 @@
|
||||
module github.com/beego/bee
|
||||
module github.com/beego/bee/v2
|
||||
|
||||
go 1.13
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
github.com/beego/bee/cmd/commands/run/*.go:S1024
|
||||
github.com/beego/bee/cmd/commands/dlv/*.go:S1024
|
||||
github.com/beego/bee/utils/*.go:S1026
|
||||
github.com/beego/bee/v2/cmd/commands/run/*.go:S1024
|
||||
github.com/beego/bee/v2/cmd/commands/dlv/*.go:S1024
|
||||
github.com/beego/bee/v2/utils/*.go:S1026
|
||||
|
@ -3,8 +3,8 @@ package beegopro
|
||||
import (
|
||||
"io/ioutil"
|
||||
|
||||
"github.com/beego/bee/internal/pkg/utils"
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/v2/internal/pkg/utils"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
)
|
||||
|
||||
var CompareExcept = []string{"@BeeGenerateTime"}
|
||||
|
@ -6,10 +6,10 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/beego/bee/internal/pkg/git"
|
||||
"github.com/beego/bee/internal/pkg/system"
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/utils"
|
||||
"github.com/beego/bee/v2/internal/pkg/git"
|
||||
"github.com/beego/bee/v2/internal/pkg/system"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/pelletier/go-toml"
|
||||
"github.com/spf13/viper"
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/utils"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
)
|
||||
|
||||
var SQL utils.DocValue
|
||||
|
@ -4,8 +4,8 @@ import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
|
||||
"github.com/beego/bee/internal/pkg/utils"
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/v2/internal/pkg/utils"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
)
|
||||
|
||||
type MysqlParser struct {
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"strings"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/beego/bee/utils"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
"github.com/flosch/pongo2"
|
||||
)
|
||||
|
||||
|
@ -11,8 +11,8 @@ import (
|
||||
"github.com/flosch/pongo2"
|
||||
"github.com/smartwalle/pongo2render"
|
||||
|
||||
"github.com/beego/bee/internal/pkg/system"
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/v2/internal/pkg/system"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
)
|
||||
|
||||
// render
|
||||
|
@ -6,10 +6,10 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/beego/bee/internal/pkg/command"
|
||||
"github.com/beego/bee/internal/pkg/system"
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/utils"
|
||||
"github.com/beego/bee/v2/internal/pkg/command"
|
||||
"github.com/beego/bee/v2/internal/pkg/system"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
"github.com/flosch/pongo2"
|
||||
"github.com/smartwalle/pongo2render"
|
||||
)
|
||||
|
@ -3,7 +3,7 @@ package beegopro
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/beego/bee/utils"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
)
|
||||
|
||||
// parse get the model info
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"database/sql"
|
||||
"errors"
|
||||
|
||||
"github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/v2/logger"
|
||||
)
|
||||
|
||||
type TableSchema struct {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package beegopro
|
||||
|
||||
import (
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
)
|
||||
|
||||
type TextModel struct {
|
||||
|
@ -11,8 +11,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/beego/bee/internal/pkg/utils"
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/v2/internal/pkg/utils"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
)
|
||||
|
||||
// write to file
|
||||
|
@ -8,9 +8,9 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/beego/bee/internal/pkg/command"
|
||||
"github.com/beego/bee/internal/pkg/utils"
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/v2/internal/pkg/command"
|
||||
"github.com/beego/bee/v2/internal/pkg/utils"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
)
|
||||
|
||||
// git tag
|
||||
|
@ -3,7 +3,7 @@ package utils
|
||||
import (
|
||||
"os"
|
||||
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
)
|
||||
|
||||
// Mkdir ...
|
||||
|
@ -24,7 +24,7 @@ import (
|
||||
"text/template"
|
||||
"time"
|
||||
|
||||
"github.com/beego/bee/logger/colors"
|
||||
"github.com/beego/bee/v2/logger/colors"
|
||||
)
|
||||
|
||||
var errInvalidLogLevel = errors.New("logger: invalid log level")
|
||||
|
8
main.go
8
main.go
@ -18,10 +18,10 @@ import (
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/beego/bee/cmd"
|
||||
"github.com/beego/bee/cmd/commands"
|
||||
"github.com/beego/bee/config"
|
||||
"github.com/beego/bee/utils"
|
||||
"github.com/beego/bee/v2/cmd"
|
||||
"github.com/beego/bee/v2/cmd/commands"
|
||||
"github.com/beego/bee/v2/config"
|
||||
"github.com/beego/bee/v2/utils"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -1 +1 @@
|
||||
github.com/beego/bee/generate/swaggergen/*.go:SA1024
|
||||
github.com/beego/bee/v2/generate/swaggergen/*.go:SA1024
|
||||
|
@ -21,7 +21,7 @@ import (
|
||||
|
||||
"runtime"
|
||||
|
||||
"github.com/beego/bee/config"
|
||||
"github.com/beego/bee/v2/config"
|
||||
)
|
||||
|
||||
const appName = "Beego"
|
||||
|
@ -32,10 +32,10 @@ import (
|
||||
"time"
|
||||
"unicode"
|
||||
|
||||
"github.com/beego/bee/config"
|
||||
"github.com/beego/bee/internal/pkg/system"
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"github.com/beego/bee/logger/colors"
|
||||
"github.com/beego/bee/v2/config"
|
||||
"github.com/beego/bee/v2/internal/pkg/system"
|
||||
beeLogger "github.com/beego/bee/v2/logger"
|
||||
"github.com/beego/bee/v2/logger/colors"
|
||||
)
|
||||
|
||||
type tagName struct {
|
||||
|
Loading…
Reference in New Issue
Block a user