Skip to content

Commit

Permalink
【优化框架】修改go.mod module名称
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxi2015 committed Aug 17, 2022
1 parent 31089fd commit 2309977
Show file tree
Hide file tree
Showing 38 changed files with 102 additions and 102 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ make linux
引用包

```go
import "mqenergy-go/pkg/paginator"
import "github.com/MQEnergy/go-framework/pkg/paginator"
```

### 一、基础用法
Expand Down Expand Up @@ -564,7 +564,7 @@ go run main.go account -help
### 初始化go.mod

```bash
go mod init mqenergy-go/gin-framework
go mod init github.com/MQEnergy/go-framework/gin-framework
go mod tidy
```

Expand Down
8 changes: 4 additions & 4 deletions app/controller/backend/attachment.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package backend

import (
"github.com/MQEnergy/go-framework/app/controller/base"
"github.com/MQEnergy/go-framework/pkg/response"
"github.com/MQEnergy/go-framework/pkg/util"
"github.com/MQEnergy/go-framework/types/attachment"
"github.com/gin-gonic/gin"
"mqenergy-go/app/controller/base"
"mqenergy-go/pkg/response"
"mqenergy-go/pkg/util"
"mqenergy-go/types/attachment"
"net/http"
)

Expand Down
8 changes: 4 additions & 4 deletions app/controller/backend/auth.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package backend

import (
"github.com/MQEnergy/go-framework/app/controller/base"
"github.com/MQEnergy/go-framework/app/service/common"
"github.com/MQEnergy/go-framework/pkg/response"
"github.com/MQEnergy/go-framework/types/user"
"github.com/gin-gonic/gin"
"mqenergy-go/app/controller/base"
"mqenergy-go/app/service/common"
"mqenergy-go/pkg/response"
"mqenergy-go/types/user"
"net/http"
)

Expand Down
8 changes: 4 additions & 4 deletions app/controller/backend/user.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package backend

import (
"github.com/MQEnergy/go-framework/app/controller/base"
"github.com/MQEnergy/go-framework/app/service/backend"
"github.com/MQEnergy/go-framework/pkg/response"
"github.com/MQEnergy/go-framework/types/user"
"github.com/gin-gonic/gin"
"mqenergy-go/app/controller/base"
"mqenergy-go/app/service/backend"
"mqenergy-go/pkg/response"
"mqenergy-go/types/user"
"net/http"
)

Expand Down
4 changes: 2 additions & 2 deletions app/controller/base/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package base

import (
"errors"
"github.com/MQEnergy/go-framework/pkg/response"
"github.com/MQEnergy/go-framework/pkg/validator"
"github.com/gin-gonic/gin"
"mqenergy-go/pkg/response"
"mqenergy-go/pkg/validator"
"net/http"
)

Expand Down
8 changes: 4 additions & 4 deletions app/controller/common/common.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package common

import (
"github.com/MQEnergy/go-framework/app/controller/base"
"github.com/MQEnergy/go-framework/global"
"github.com/MQEnergy/go-framework/models"
"github.com/MQEnergy/go-framework/pkg/response"
"github.com/gin-gonic/gin"
"github.com/jinzhu/copier"
"github.com/samber/lo"
"mqenergy-go/app/controller/base"
"mqenergy-go/global"
"mqenergy-go/models"
"mqenergy-go/pkg/response"
"net/http"
"strings"
)
Expand Down
8 changes: 4 additions & 4 deletions app/controller/common/token.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package common

import (
"github.com/MQEnergy/go-framework/app/controller/base"
"github.com/MQEnergy/go-framework/global"
"github.com/MQEnergy/go-framework/pkg/auth"
"github.com/MQEnergy/go-framework/pkg/response"
"github.com/gin-gonic/gin"
"mqenergy-go/app/controller/base"
"mqenergy-go/global"
"mqenergy-go/pkg/auth"
"mqenergy-go/pkg/response"
"net/http"
"strings"
)
Expand Down
2 changes: 1 addition & 1 deletion app/controller/frontend/user.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package frontend

import (
"mqenergy-go/app/controller/base"
"github.com/MQEnergy/go-framework/app/controller/base"
)

type UserController struct {
Expand Down
8 changes: 4 additions & 4 deletions app/service/backend/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package backend

import (
"fmt"
"github.com/MQEnergy/go-framework/global"
"github.com/MQEnergy/go-framework/models"
"github.com/MQEnergy/go-framework/pkg/paginator"
"github.com/MQEnergy/go-framework/types/user"
gorabbitmq "github.com/MQEnergy/go-rabbitmq"
"github.com/gogf/gf/v2/util/gconv"
"mqenergy-go/global"
"mqenergy-go/models"
"mqenergy-go/pkg/paginator"
"mqenergy-go/types/user"
"sync"
)

Expand Down
6 changes: 3 additions & 3 deletions app/service/common/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package common

import (
"errors"
"mqenergy-go/global"
"mqenergy-go/pkg/auth"
"mqenergy-go/types/user"
"github.com/MQEnergy/go-framework/global"
"github.com/MQEnergy/go-framework/pkg/auth"
"github.com/MQEnergy/go-framework/types/user"
)

type UserService struct{}
Expand Down
8 changes: 4 additions & 4 deletions bootstrap/boot.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package bootstrap

import (
"fmt"
"github.com/MQEnergy/go-framework/config"
"github.com/MQEnergy/go-framework/global"
"github.com/MQEnergy/go-framework/pkg/lib"
"github.com/MQEnergy/go-framework/pkg/util"
"github.com/sirupsen/logrus"
"mqenergy-go/config"
"mqenergy-go/global"
"mqenergy-go/pkg/lib"
"mqenergy-go/pkg/util"
)

// 定义服务列表
Expand Down
10 changes: 5 additions & 5 deletions cmd/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package cmd

import (
"fmt"
"github.com/MQEnergy/go-framework/bootstrap"
"github.com/MQEnergy/go-framework/config"
"github.com/MQEnergy/go-framework/global"
"github.com/MQEnergy/go-framework/models"
"github.com/MQEnergy/go-framework/pkg/util"
"github.com/urfave/cli/v2"
"mqenergy-go/bootstrap"
"mqenergy-go/config"
"mqenergy-go/global"
"mqenergy-go/models"
"mqenergy-go/pkg/util"
"time"
)

Expand Down
6 changes: 3 additions & 3 deletions cmd/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package cmd

import (
"fmt"
"github.com/MQEnergy/go-framework/bootstrap"
"github.com/MQEnergy/go-framework/config"
"github.com/MQEnergy/go-framework/pkg/util"
"github.com/urfave/cli/v2"
"io/ioutil"
"mqenergy-go/bootstrap"
"mqenergy-go/config"
"mqenergy-go/pkg/util"
"strings"
)

Expand Down
6 changes: 3 additions & 3 deletions cmd/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ package cmd
import (
"database/sql"
"fmt"
"github.com/MQEnergy/go-framework/bootstrap"
"github.com/MQEnergy/go-framework/config"
"github.com/MQEnergy/go-framework/global"
"github.com/go-sql-driver/mysql"
"github.com/golang-migrate/migrate/v4"
dmysql "github.com/golang-migrate/migrate/v4/database/mysql"
_ "github.com/golang-migrate/migrate/v4/source/file"
"github.com/urfave/cli/v2"
"mqenergy-go/bootstrap"
"mqenergy-go/config"
"mqenergy-go/global"
"strconv"
"time"
)
Expand Down
6 changes: 3 additions & 3 deletions cmd/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package cmd

import (
"fmt"
"github.com/MQEnergy/go-framework/bootstrap"
"github.com/MQEnergy/go-framework/config"
"github.com/MQEnergy/go-framework/global"
gomodel "github.com/MQEnergy/gorm-model"
"github.com/urfave/cli/v2"
"mqenergy-go/bootstrap"
"mqenergy-go/config"
"mqenergy-go/global"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions cmd/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package cmd

import (
"fmt"
"github.com/MQEnergy/go-framework/bootstrap"
"github.com/MQEnergy/go-framework/config"
"github.com/MQEnergy/go-framework/pkg/util"
"github.com/urfave/cli/v2"
"io/ioutil"
"mqenergy-go/bootstrap"
"mqenergy-go/config"
"mqenergy-go/pkg/util"
"strings"
)

Expand Down
10 changes: 5 additions & 5 deletions cmd/test/consumer.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package main

import (
"github.com/MQEnergy/go-framework/app/amqp/consumer"
"github.com/MQEnergy/go-framework/app/service/backend"
"github.com/MQEnergy/go-framework/bootstrap"
"github.com/MQEnergy/go-framework/config"
"github.com/MQEnergy/go-framework/global"
gorabbitmq "github.com/MQEnergy/go-rabbitmq"
"mqenergy-go/app/amqp/consumer"
"mqenergy-go/app/service/backend"
"mqenergy-go/bootstrap"
"mqenergy-go/config"
"mqenergy-go/global"
"time"
)

Expand Down
12 changes: 6 additions & 6 deletions cmd/test/producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package main

import (
"fmt"
"github.com/MQEnergy/go-framework/app/amqp/producer"
"github.com/MQEnergy/go-framework/app/service/backend"
"github.com/MQEnergy/go-framework/bootstrap"
"github.com/MQEnergy/go-framework/config"
"github.com/MQEnergy/go-framework/global"
"github.com/MQEnergy/go-framework/pkg/util"
gorabbitmq "github.com/MQEnergy/go-rabbitmq"
"mqenergy-go/app/amqp/producer"
"mqenergy-go/app/service/backend"
"mqenergy-go/bootstrap"
"mqenergy-go/config"
"mqenergy-go/global"
"mqenergy-go/pkg/util"
"time"
)

Expand Down
2 changes: 1 addition & 1 deletion config.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jwt:
secret: '3jQSRZXeXzr09hq0GrZuL9Dgtk2XV9Ax'
log:
debug: true
fileName: 'mqenergy-go' # 日志文件名称
fileName: 'github.com/MQEnergy/go-framework' # 日志文件名称
dirPath: 'runtime/logs' # 日志默认存放目录
mysql:
- host: '127.0.0.1'
Expand Down
2 changes: 1 addition & 1 deletion config.prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jwt:
secret: '3jQSRZXeXzr09hq0GrZuL9Dgtk2XV9Ax'
log:
debug: true
fileName: 'mqenergy-go' # 日志文件名称
fileName: 'github.com/MQEnergy/go-framework' # 日志文件名称
dirPath: 'runtime/logs' # 日志默认存放目录
mysql:
- host: '127.0.0.1'
Expand Down
2 changes: 1 addition & 1 deletion config.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jwt:
secret: '3jQSRZXeXzr09hq0GrZuL9Dgtk2XV9Ax'
log:
debug: true
fileName: 'mqenergy-go' # 日志文件名称
fileName: 'github.com/MQEnergy/go-framework' # 日志文件名称
dirPath: 'runtime/logs' # 日志默认存放目录
mysql:
- host: '127.0.0.1'
Expand Down
6 changes: 3 additions & 3 deletions global/app/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"context"
"encoding/json"
"errors"
"github.com/MQEnergy/go-framework/global"
"github.com/MQEnergy/go-framework/pkg/auth"
"github.com/MQEnergy/go-framework/types/admin"
"github.com/gin-gonic/gin"
"mqenergy-go/global"
"mqenergy-go/pkg/auth"
"mqenergy-go/types/admin"
"strconv"
)

Expand Down
4 changes: 2 additions & 2 deletions global/vars.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package global

import (
"github.com/MQEnergy/go-framework/config"
"github.com/MQEnergy/go-framework/pkg/lib"
"github.com/gin-gonic/gin"
"github.com/go-redis/redis/v8"
"gorm.io/gorm"
"mqenergy-go/config"
"mqenergy-go/pkg/lib"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module mqenergy-go
module github.com/MQEnergy/go-framework

go 1.18

Expand Down
10 changes: 5 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package main

import (
"fmt"
"github.com/MQEnergy/go-framework/bootstrap"
"github.com/MQEnergy/go-framework/cmd"
"github.com/MQEnergy/go-framework/config"
"github.com/MQEnergy/go-framework/pkg/validator"
"github.com/MQEnergy/go-framework/router"
"github.com/gogf/gf/v2/os/gtime"
"github.com/urfave/cli/v2"
"mqenergy-go/bootstrap"
"mqenergy-go/cmd"
"mqenergy-go/config"
"mqenergy-go/pkg/validator"
"mqenergy-go/router"
"os"
"runtime"
)
Expand Down
8 changes: 4 additions & 4 deletions middleware/casbin_auth.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package middleware

import (
"github.com/MQEnergy/go-framework/global"
"github.com/MQEnergy/go-framework/global/app"
"github.com/MQEnergy/go-framework/pkg/response"
util2 "github.com/MQEnergy/go-framework/pkg/util"
"github.com/casbin/casbin/v2"
"github.com/casbin/casbin/v2/util"
gormadapter "github.com/casbin/gorm-adapter/v3"
"github.com/gin-gonic/gin"
"github.com/gogf/gf/v2/util/gconv"
"mqenergy-go/global"
"mqenergy-go/global/app"
"mqenergy-go/pkg/response"
util2 "mqenergy-go/pkg/util"
"os"
"strings"
)
Expand Down
2 changes: 1 addition & 1 deletion middleware/ip_auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package middleware

import (
"fmt"
"github.com/MQEnergy/go-framework/config"
"github.com/gin-gonic/gin"
"mqenergy-go/config"
"net/http"
)

Expand Down
Loading

0 comments on commit 2309977

Please sign in to comment.