1
0
mirror of https://github.com/beego/bee.git synced 2024-11-18 03:30:55 +00:00

upgrade version to 2

This commit is contained in:
Ming Deng 2020-12-16 13:20:41 +08:00
parent ebb2fee3fc
commit 06e09b0f87
59 changed files with 202 additions and 191 deletions

View File

@ -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)

View File

@ -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

View File

@ -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 {

View File

@ -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{

View File

@ -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{

View File

@ -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

View File

@ -1,4 +1,4 @@
// Copyright 2020
// Copyright 2020
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -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

View File

@ -1,4 +1,4 @@
// Copyright 2020
// Copyright 2020
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -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)
}

View File

@ -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{

View File

@ -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

View File

@ -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{

View File

@ -17,7 +17,7 @@ package dev
import (
"os"
beeLogger "github.com/beego/bee/logger"
beeLogger "github.com/beego/bee/v2/logger"
)
var preCommit = `

View File

@ -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{

View File

@ -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}}

View File

@ -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{

View File

@ -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{

View File

@ -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{

View File

@ -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

View File

@ -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{

View File

@ -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{

View File

@ -7,7 +7,7 @@ import (
"os"
"strings"
beeLogger "github.com/beego/bee/logger"
beeLogger "github.com/beego/bee/v2/logger"
)
var (

View File

@ -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"
)

View File

@ -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{

View File

@ -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"
)

View File

@ -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{

View File

@ -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,
}

View File

@ -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.

View File

@ -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______

View File

@ -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 {

View File

@ -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

View File

@ -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"
)

View File

@ -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) {

View File

@ -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"
)

View File

@ -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 (

View File

@ -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) {

View File

@ -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) {

View File

@ -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

View File

@ -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
View File

@ -1,4 +1,4 @@
module github.com/beego/bee
module github.com/beego/bee/v2
go 1.13

View File

@ -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

View File

@ -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"}

View File

@ -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"

View File

@ -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

View File

@ -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 {

View File

@ -4,7 +4,7 @@ import (
"strings"
"unicode/utf8"
"github.com/beego/bee/utils"
"github.com/beego/bee/v2/utils"
"github.com/flosch/pongo2"
)

View File

@ -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

View File

@ -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"
)

View File

@ -3,7 +3,7 @@ package beegopro
import (
"strings"
"github.com/beego/bee/utils"
"github.com/beego/bee/v2/utils"
)
// parse get the model info

View File

@ -4,7 +4,7 @@ import (
"database/sql"
"errors"
"github.com/beego/bee/logger"
"github.com/beego/bee/v2/logger"
)
type TableSchema struct {

View File

@ -1,7 +1,7 @@
package beegopro
import (
beeLogger "github.com/beego/bee/logger"
beeLogger "github.com/beego/bee/v2/logger"
)
type TextModel struct {

View File

@ -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

View 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

View File

@ -3,7 +3,7 @@ package utils
import (
"os"
beeLogger "github.com/beego/bee/logger"
beeLogger "github.com/beego/bee/v2/logger"
)
// Mkdir ...

View File

@ -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")

View File

@ -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() {

View File

@ -1 +1 @@
github.com/beego/bee/generate/swaggergen/*.go:SA1024
github.com/beego/bee/v2/generate/swaggergen/*.go:SA1024

View File

@ -21,7 +21,7 @@ import (
"runtime"
"github.com/beego/bee/config"
"github.com/beego/bee/v2/config"
)
const appName = "Beego"

View File

@ -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 {

View File

@ -1,4 +1,4 @@
// Copyright 2020
// Copyright 2020
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.