Browse Source

upgrade version to 2

pull/753/head
Ming Deng 10 months ago
parent
commit
06e09b0f87
  1. 2
      Makefile
  2. 4
      README.md
  3. 38
      cmd/bee.go
  4. 12
      cmd/commands/api/apiapp.go
  5. 10
      cmd/commands/bale/bale.go
  6. 10
      cmd/commands/beefix/fix.go
  7. 18
      cmd/commands/beefix/fix1To2.go
  8. 9
      cmd/commands/beefix/fixTo1.6.go
  9. 6
      cmd/commands/beegopro/beegopro.go
  10. 4
      cmd/commands/command.go
  11. 4
      cmd/commands/dev/cmd.go
  12. 2
      cmd/commands/dev/githook.go
  13. 12
      cmd/commands/dlv/dlv_amd64.go
  14. 8
      cmd/commands/dockerize/dockerize.go
  15. 14
      cmd/commands/generate/generate.go
  16. 16
      cmd/commands/hprose/hprose.go
  17. 10
      cmd/commands/migrate/migrate.go
  18. 10
      cmd/commands/new/new.go
  19. 8
      cmd/commands/pack/pack.go
  20. 12
      cmd/commands/rs/rs.go
  21. 2
      cmd/commands/run/docs.go
  22. 2
      cmd/commands/run/reload.go
  23. 10
      cmd/commands/run/run.go
  24. 8
      cmd/commands/run/watch.go
  25. 8
      cmd/commands/server/server.go
  26. 8
      cmd/commands/update/update.go
  27. 2
      cmd/commands/version/banner.go
  28. 10
      cmd/commands/version/version.go
  29. 4
      config/conf.go
  30. 2
      generate/g.go
  31. 6
      generate/g_appcode.go
  32. 6
      generate/g_controllers.go
  33. 6
      generate/g_hproseappcode.go
  34. 6
      generate/g_migration.go
  35. 6
      generate/g_model.go
  36. 6
      generate/g_scaffold.go
  37. 6
      generate/g_views.go
  38. 4
      generate/swaggergen/g_docs.go
  39. 2
      go.mod
  40. 6
      gosimple.ignore
  41. 4
      internal/app/module/beegopro/config.go
  42. 8
      internal/app/module/beegopro/container.go
  43. 4
      internal/app/module/beegopro/migration.go
  44. 4
      internal/app/module/beegopro/parser_mysql.go
  45. 2
      internal/app/module/beegopro/pongo2.go
  46. 4
      internal/app/module/beegopro/render.go
  47. 8
      internal/app/module/beegopro/schema.go
  48. 2
      internal/app/module/beegopro/schema_model.go
  49. 2
      internal/app/module/beegopro/schema_mysql_model.go
  50. 2
      internal/app/module/beegopro/schema_text_model.go
  51. 4
      internal/app/module/beegopro/util.go
  52. 6
      internal/pkg/git/repository.go
  53. 2
      internal/pkg/utils/file.go
  54. 2
      logger/logger.go
  55. 8
      main.go
  56. 2
      staticcheck.ignore
  57. 2
      utils/notification.go
  58. 8
      utils/utils.go
  59. 2
      utils/version.go

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)

4
README.md

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

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

12
cmd/commands/api/apiapp.go

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

10
cmd/commands/bale/bale.go

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

10
cmd/commands/beefix/fix.go

@ -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
cmd/commands/beefix/fix1To2.go

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

9
cmd/commands/beefix/fixTo1.6.go

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

6
cmd/commands/beegopro/beegopro.go

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

4
cmd/commands/command.go

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

4
cmd/commands/dev/cmd.go

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

2
cmd/commands/dev/githook.go

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

12
cmd/commands/dlv/dlv_amd64.go

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

8
cmd/commands/dockerize/dockerize.go

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

14
cmd/commands/generate/generate.go

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

16
cmd/commands/hprose/hprose.go

@ -6,14 +6,14 @@ import (
"path"
"strings"
"github.com/beego/bee/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/logger/colors"
"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{

10
cmd/commands/migrate/migrate.go

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

10
cmd/commands/new/new.go

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

8
cmd/commands/pack/pack.go

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

12
cmd/commands/rs/rs.go

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

2
cmd/commands/run/docs.go

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

2
cmd/commands/run/reload.go

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

10
cmd/commands/run/run.go

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

8
cmd/commands/run/watch.go

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

8
cmd/commands/server/server.go

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

8
cmd/commands/update/update.go

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

2
cmd/commands/version/banner.go

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

10
cmd/commands/version/version.go

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

4
config/conf.go

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

2
generate/g.go

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

6
generate/g_appcode.go

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

6
generate/g_controllers.go

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

6
generate/g_hproseappcode.go

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

6
generate/g_migration.go

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

6
generate/g_model.go

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

6
generate/g_scaffold.go

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

6
generate/g_views.go

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

4
generate/swaggergen/g_docs.go

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

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

6
gosimple.ignore

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

4
internal/app/module/beegopro/config.go

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

8
internal/app/module/beegopro/container.go

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

4
internal/app/module/beegopro/migration.go

@ -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
internal/app/module/beegopro/parser_mysql.go

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

2
internal/app/module/beegopro/pongo2.go

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

4
internal/app/module/beegopro/render.go

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

8
internal/app/module/beegopro/schema.go

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

2
internal/app/module/beegopro/schema_model.go

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

2
internal/app/module/beegopro/schema_mysql_model.go

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

2
internal/app/module/beegopro/schema_text_model.go

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

4
internal/app/module/beegopro/util.go

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

6
internal/pkg/git/repository.go

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

2
internal/pkg/utils/file.go

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

2
logger/logger.go

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

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

2
staticcheck.ignore

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

2
utils/notification.go

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

8
utils/utils.go

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

2
utils/version.go

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

Loading…
Cancel
Save