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 a3621fb commit b7d9604
Show file tree
Hide file tree
Showing 35 changed files with 99 additions and 99 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 "github.com/MQEnergy/go-framework/pkg/paginator"
import "github.com/MQEnergy/gin-framework/pkg/paginator"
```

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

```bash
go mod init github.com/MQEnergy/go-framework/gin-framework
go mod init github.com/MQEnergy/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,10 +1,10 @@
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/MQEnergy/gin-framework/app/controller/base"
"github.com/MQEnergy/gin-framework/pkg/response"
"github.com/MQEnergy/gin-framework/pkg/util"
"github.com/MQEnergy/gin-framework/types/attachment"
"github.com/gin-gonic/gin"
"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,10 +1,10 @@
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/MQEnergy/gin-framework/app/controller/base"
"github.com/MQEnergy/gin-framework/app/service/common"
"github.com/MQEnergy/gin-framework/pkg/response"
"github.com/MQEnergy/gin-framework/types/user"
"github.com/gin-gonic/gin"
"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,10 +1,10 @@
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/MQEnergy/gin-framework/app/controller/base"
"github.com/MQEnergy/gin-framework/app/service/backend"
"github.com/MQEnergy/gin-framework/pkg/response"
"github.com/MQEnergy/gin-framework/types/user"
"github.com/gin-gonic/gin"
"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,8 +2,8 @@ package base

import (
"errors"
"github.com/MQEnergy/go-framework/pkg/response"
"github.com/MQEnergy/go-framework/pkg/validator"
"github.com/MQEnergy/gin-framework/pkg/response"
"github.com/MQEnergy/gin-framework/pkg/validator"
"github.com/gin-gonic/gin"
"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,10 +1,10 @@
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/MQEnergy/gin-framework/app/controller/base"
"github.com/MQEnergy/gin-framework/global"
"github.com/MQEnergy/gin-framework/models"
"github.com/MQEnergy/gin-framework/pkg/response"
"github.com/gin-gonic/gin"
"github.com/jinzhu/copier"
"github.com/samber/lo"
Expand Down
8 changes: 4 additions & 4 deletions app/controller/common/token.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
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/MQEnergy/gin-framework/app/controller/base"
"github.com/MQEnergy/gin-framework/global"
"github.com/MQEnergy/gin-framework/pkg/auth"
"github.com/MQEnergy/gin-framework/pkg/response"
"github.com/gin-gonic/gin"
"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 (
"github.com/MQEnergy/go-framework/app/controller/base"
"github.com/MQEnergy/gin-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,10 +2,10 @@ 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"
"github.com/MQEnergy/gin-framework/global"
"github.com/MQEnergy/gin-framework/models"
"github.com/MQEnergy/gin-framework/pkg/paginator"
"github.com/MQEnergy/gin-framework/types/user"
gorabbitmq "github.com/MQEnergy/go-rabbitmq"
"github.com/gogf/gf/v2/util/gconv"
"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"
"github.com/MQEnergy/go-framework/global"
"github.com/MQEnergy/go-framework/pkg/auth"
"github.com/MQEnergy/go-framework/types/user"
"github.com/MQEnergy/gin-framework/global"
"github.com/MQEnergy/gin-framework/pkg/auth"
"github.com/MQEnergy/gin-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,10 +2,10 @@ 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/MQEnergy/gin-framework/config"
"github.com/MQEnergy/gin-framework/global"
"github.com/MQEnergy/gin-framework/pkg/lib"
"github.com/MQEnergy/gin-framework/pkg/util"
"github.com/sirupsen/logrus"
)

Expand Down
10 changes: 5 additions & 5 deletions cmd/admin.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"
"github.com/MQEnergy/go-framework/models"
"github.com/MQEnergy/go-framework/pkg/util"
"github.com/MQEnergy/gin-framework/bootstrap"
"github.com/MQEnergy/gin-framework/config"
"github.com/MQEnergy/gin-framework/global"
"github.com/MQEnergy/gin-framework/models"
"github.com/MQEnergy/gin-framework/pkg/util"
"github.com/urfave/cli/v2"
"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,9 +2,9 @@ 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/MQEnergy/gin-framework/bootstrap"
"github.com/MQEnergy/gin-framework/config"
"github.com/MQEnergy/gin-framework/pkg/util"
"github.com/urfave/cli/v2"
"io/ioutil"
"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,9 +3,9 @@ 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/MQEnergy/gin-framework/bootstrap"
"github.com/MQEnergy/gin-framework/config"
"github.com/MQEnergy/gin-framework/global"
"github.com/go-sql-driver/mysql"
"github.com/golang-migrate/migrate/v4"
dmysql "github.com/golang-migrate/migrate/v4/database/mysql"
Expand Down
6 changes: 3 additions & 3 deletions cmd/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ 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/gin-framework/bootstrap"
"github.com/MQEnergy/gin-framework/config"
"github.com/MQEnergy/gin-framework/global"
gomodel "github.com/MQEnergy/gorm-model"
"github.com/urfave/cli/v2"
)
Expand Down
6 changes: 3 additions & 3 deletions cmd/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ 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/MQEnergy/gin-framework/bootstrap"
"github.com/MQEnergy/gin-framework/config"
"github.com/MQEnergy/gin-framework/pkg/util"
"github.com/urfave/cli/v2"
"io/ioutil"
"strings"
Expand Down
10 changes: 5 additions & 5 deletions cmd/test/consumer.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
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"
"github.com/MQEnergy/gin-framework/app/amqp/consumer"
"github.com/MQEnergy/gin-framework/app/service/backend"
"github.com/MQEnergy/gin-framework/bootstrap"
"github.com/MQEnergy/gin-framework/config"
"github.com/MQEnergy/gin-framework/global"
gorabbitmq "github.com/MQEnergy/go-rabbitmq"
"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,12 +2,12 @@ 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"
"github.com/MQEnergy/gin-framework/app/amqp/producer"
"github.com/MQEnergy/gin-framework/app/service/backend"
"github.com/MQEnergy/gin-framework/bootstrap"
"github.com/MQEnergy/gin-framework/config"
"github.com/MQEnergy/gin-framework/global"
"github.com/MQEnergy/gin-framework/pkg/util"
gorabbitmq "github.com/MQEnergy/go-rabbitmq"
"time"
)
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,9 +4,9 @@ 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/MQEnergy/gin-framework/global"
"github.com/MQEnergy/gin-framework/pkg/auth"
"github.com/MQEnergy/gin-framework/types/admin"
"github.com/gin-gonic/gin"
"strconv"
)
Expand Down
4 changes: 2 additions & 2 deletions global/vars.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package global

import (
"github.com/MQEnergy/go-framework/config"
"github.com/MQEnergy/go-framework/pkg/lib"
"github.com/MQEnergy/gin-framework/config"
"github.com/MQEnergy/gin-framework/pkg/lib"
"github.com/gin-gonic/gin"
"github.com/go-redis/redis/v8"
"gorm.io/gorm"
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 github.com/MQEnergy/go-framework
module github.com/MQEnergy/gin-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,11 +2,11 @@ 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/MQEnergy/gin-framework/bootstrap"
"github.com/MQEnergy/gin-framework/cmd"
"github.com/MQEnergy/gin-framework/config"
"github.com/MQEnergy/gin-framework/pkg/validator"
"github.com/MQEnergy/gin-framework/router"
"github.com/gogf/gf/v2/os/gtime"
"github.com/urfave/cli/v2"
"os"
Expand Down
8 changes: 4 additions & 4 deletions middleware/casbin_auth.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
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/MQEnergy/gin-framework/global"
"github.com/MQEnergy/gin-framework/global/app"
"github.com/MQEnergy/gin-framework/pkg/response"
util2 "github.com/MQEnergy/gin-framework/pkg/util"
"github.com/casbin/casbin/v2"
"github.com/casbin/casbin/v2/util"
gormadapter "github.com/casbin/gorm-adapter/v3"
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,7 +2,7 @@ package middleware

import (
"fmt"
"github.com/MQEnergy/go-framework/config"
"github.com/MQEnergy/gin-framework/config"
"github.com/gin-gonic/gin"
"net/http"
)
Expand Down
6 changes: 3 additions & 3 deletions middleware/login_auth.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package middleware

import (
"github.com/MQEnergy/go-framework/global"
"github.com/MQEnergy/go-framework/pkg/auth"
"github.com/MQEnergy/go-framework/pkg/response"
"github.com/MQEnergy/gin-framework/global"
"github.com/MQEnergy/gin-framework/pkg/auth"
"github.com/MQEnergy/gin-framework/pkg/response"
"github.com/gin-gonic/gin"
"strings"
)
Expand Down
2 changes: 1 addition & 1 deletion middleware/requestid_auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"encoding/json"
"fmt"
"github.com/MQEnergy/go-framework/global"
"github.com/MQEnergy/gin-framework/global"
"github.com/gin-contrib/requestid"
"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"
Expand Down
2 changes: 1 addition & 1 deletion models/model.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package models

import "github.com/MQEnergy/go-framework/pkg/util"
import "github.com/MQEnergy/gin-framework/pkg/util"

type Model struct {
Id uint64 `gorm:"primaryKey;autoIncrement;column:id;type:bigint unsigned;NOT NULL;" json:"id"`
Expand Down
4 changes: 2 additions & 2 deletions pkg/paginator/pagination.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package paginator

import (
"github.com/MQEnergy/go-framework/global"
"github.com/MQEnergy/go-framework/pkg/util"
"github.com/MQEnergy/gin-framework/global"
"github.com/MQEnergy/gin-framework/pkg/util"
"github.com/samber/lo"
"gorm.io/gorm"
"math"
Expand Down
2 changes: 1 addition & 1 deletion pkg/util/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package util
import (
"errors"
"fmt"
"github.com/MQEnergy/go-framework/global"
"github.com/MQEnergy/gin-framework/global"
"github.com/gin-gonic/gin"
"io/ioutil"
"os"
Expand Down
10 changes: 5 additions & 5 deletions router/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package router

import (
"fmt"
"github.com/MQEnergy/go-framework/config"
"github.com/MQEnergy/go-framework/global"
"github.com/MQEnergy/go-framework/middleware"
"github.com/MQEnergy/go-framework/pkg/response"
"github.com/MQEnergy/go-framework/router/routes"
"github.com/MQEnergy/gin-framework/config"
"github.com/MQEnergy/gin-framework/global"
"github.com/MQEnergy/gin-framework/middleware"
"github.com/MQEnergy/gin-framework/pkg/response"
"github.com/MQEnergy/gin-framework/router/routes"
"github.com/gin-contrib/cors"
"github.com/gin-contrib/requestid"
"github.com/gin-gonic/gin"
Expand Down
Loading

0 comments on commit b7d9604

Please sign in to comment.