🎨 清理多余文件,修改项目model
This commit is contained in:
@@ -2,7 +2,7 @@ package ast
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/model/system"
|
||||
"go/ast"
|
||||
"go/parser"
|
||||
"go/token"
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
|
||||
// AddRegisterTablesAst 自动为 gorm.go 注册一个自动迁移
|
||||
func AddRegisterTablesAst(path, funcName, pk, varName, dbName, model string) {
|
||||
modelPk := fmt.Sprintf("github.com/flipped-aurora/gin-vue-admin/server/model/%s", pk)
|
||||
modelPk := fmt.Sprintf("git.echol.cn/loser/Go-Web-Template/server/model/%s", pk)
|
||||
src, err := os.ReadFile(path)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package ast
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ func RollGormBack(pk, model string) {
|
||||
if gen, ok := node.(*ast.GenDecl); ok {
|
||||
for i := range gen.Specs {
|
||||
if imspec, ok := gen.Specs[i].(*ast.ImportSpec); ok {
|
||||
if imspec.Path.Value == "\"github.com/flipped-aurora/gin-vue-admin/server/model/"+pk+"\"" {
|
||||
if imspec.Path.Value == "\"git.echol.cn/loser/Go-Web-Template/server/model/"+pk+"\"" {
|
||||
gp = gen
|
||||
imI = i
|
||||
return false
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package ast
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
"go/ast"
|
||||
"go/parser"
|
||||
"go/printer"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package ast
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
)
|
||||
@@ -25,7 +25,7 @@ func TestPackageEnter_Rollback(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePackageApiEnter,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "api", "v1", "enter.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/api/v1/example"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/api/v1/example"`,
|
||||
StructName: "ExampleApiGroup",
|
||||
PackageName: "example",
|
||||
PackageStructName: "ApiGroup",
|
||||
@@ -37,7 +37,7 @@ func TestPackageEnter_Rollback(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePackageRouterEnter,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "router", "enter.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/router/example"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/router/example"`,
|
||||
StructName: "Example",
|
||||
PackageName: "example",
|
||||
PackageStructName: "RouterGroup",
|
||||
@@ -49,7 +49,7 @@ func TestPackageEnter_Rollback(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePackageServiceEnter,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "service", "enter.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/service/example"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/service/example"`,
|
||||
StructName: "ExampleServiceGroup",
|
||||
PackageName: "example",
|
||||
PackageStructName: "ServiceGroup",
|
||||
@@ -99,7 +99,7 @@ func TestPackageEnter_Injection(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePackageApiEnter,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "api", "v1", "enter.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/api/v1/example"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/api/v1/example"`,
|
||||
StructName: "ExampleApiGroup",
|
||||
PackageName: "example",
|
||||
PackageStructName: "ApiGroup",
|
||||
@@ -110,7 +110,7 @@ func TestPackageEnter_Injection(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePackageRouterEnter,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "router", "enter.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/router/example"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/router/example"`,
|
||||
StructName: "Example",
|
||||
PackageName: "example",
|
||||
PackageStructName: "RouterGroup",
|
||||
@@ -122,7 +122,7 @@ func TestPackageEnter_Injection(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePackageServiceEnter,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "service", "enter.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/service/example"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/service/example"`,
|
||||
StructName: "ExampleServiceGroup",
|
||||
PackageName: "example",
|
||||
PackageStructName: "ServiceGroup",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package ast
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
)
|
||||
@@ -25,7 +25,7 @@ func TestPackageInitializeGorm_Injection(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePackageInitializeGorm,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "initialize", "gorm_biz.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/model/example"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/model/example"`,
|
||||
StructName: "ExaFileUploadAndDownload",
|
||||
PackageName: "example",
|
||||
IsNew: false,
|
||||
@@ -36,7 +36,7 @@ func TestPackageInitializeGorm_Injection(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePackageInitializeGorm,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "initialize", "gorm_biz.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/model/example"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/model/example"`,
|
||||
StructName: "ExaCustomer",
|
||||
PackageName: "example",
|
||||
IsNew: false,
|
||||
@@ -47,7 +47,7 @@ func TestPackageInitializeGorm_Injection(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePackageInitializeGorm,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "initialize", "gorm_biz.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/model/example"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/model/example"`,
|
||||
StructName: "ExaFileUploadAndDownload",
|
||||
PackageName: "example",
|
||||
IsNew: true,
|
||||
@@ -58,7 +58,7 @@ func TestPackageInitializeGorm_Injection(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePackageInitializeGorm,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "initialize", "gorm_biz.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/model/example"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/model/example"`,
|
||||
StructName: "ExaCustomer",
|
||||
PackageName: "example",
|
||||
IsNew: true,
|
||||
@@ -107,7 +107,7 @@ func TestPackageInitializeGorm_Rollback(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePackageInitializeGorm,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "initialize", "gorm_biz.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/model/example"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/model/example"`,
|
||||
StructName: "ExaFileUploadAndDownload",
|
||||
PackageName: "example",
|
||||
IsNew: false,
|
||||
@@ -118,7 +118,7 @@ func TestPackageInitializeGorm_Rollback(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePackageInitializeGorm,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "initialize", "gorm_biz.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/model/example"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/model/example"`,
|
||||
StructName: "ExaCustomer",
|
||||
PackageName: "example",
|
||||
IsNew: false,
|
||||
@@ -129,7 +129,7 @@ func TestPackageInitializeGorm_Rollback(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePackageInitializeGorm,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "initialize", "gorm_biz.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/model/example"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/model/example"`,
|
||||
StructName: "ExaFileUploadAndDownload",
|
||||
PackageName: "example",
|
||||
IsNew: true,
|
||||
@@ -140,7 +140,7 @@ func TestPackageInitializeGorm_Rollback(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePackageInitializeGorm,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "initialize", "gorm_biz.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/model/example"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/model/example"`,
|
||||
StructName: "ExaCustomer",
|
||||
PackageName: "example",
|
||||
IsNew: true,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package ast
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
)
|
||||
@@ -28,7 +28,7 @@ func TestPackageInitializeRouter_Injection(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePackageInitializeRouter,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "initialize", "router_biz.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/router"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/router"`,
|
||||
AppName: "RouterGroupApp",
|
||||
GroupName: "Example",
|
||||
ModuleName: "exampleRouter",
|
||||
@@ -43,7 +43,7 @@ func TestPackageInitializeRouter_Injection(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePackageInitializeRouter,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "initialize", "router_biz.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/router"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/router"`,
|
||||
AppName: "RouterGroupApp",
|
||||
GroupName: "Example",
|
||||
ModuleName: "exampleRouter",
|
||||
@@ -105,7 +105,7 @@ func TestPackageInitializeRouter_Rollback(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePackageInitializeRouter,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "initialize", "router_biz.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/router"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/router"`,
|
||||
AppName: "RouterGroupApp",
|
||||
GroupName: "Example",
|
||||
ModuleName: "exampleRouter",
|
||||
@@ -120,7 +120,7 @@ func TestPackageInitializeRouter_Rollback(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePackageInitializeRouter,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "initialize", "router_biz.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/router"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/router"`,
|
||||
AppName: "RouterGroupApp",
|
||||
GroupName: "Example",
|
||||
ModuleName: "exampleRouter",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package ast
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
)
|
||||
@@ -28,7 +28,7 @@ func TestPackageModuleEnter_Rollback(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePackageRouterModuleEnter,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "router", "example", "enter.go"),
|
||||
ImportPath: `api "github.com/flipped-aurora/gin-vue-admin/server/api/v1"`,
|
||||
ImportPath: `api "git.echol.cn/loser/Go-Web-Template/server/api/v1"`,
|
||||
StructName: "FileUploadAndDownloadRouter",
|
||||
AppName: "ApiGroupApp",
|
||||
GroupName: "ExampleApiGroup",
|
||||
@@ -43,7 +43,7 @@ func TestPackageModuleEnter_Rollback(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePackageApiModuleEnter,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "api", "v1", "example", "enter.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/service"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/service"`,
|
||||
StructName: "FileUploadAndDownloadApi",
|
||||
AppName: "ServiceGroupApp",
|
||||
GroupName: "ExampleServiceGroup",
|
||||
@@ -117,7 +117,7 @@ func TestPackageModuleEnter_Injection(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePackageRouterModuleEnter,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "router", "example", "enter.go"),
|
||||
ImportPath: `api "github.com/flipped-aurora/gin-vue-admin/server/api/v1"`,
|
||||
ImportPath: `api "git.echol.cn/loser/Go-Web-Template/server/api/v1"`,
|
||||
StructName: "FileUploadAndDownloadRouter",
|
||||
AppName: "ApiGroupApp",
|
||||
GroupName: "ExampleApiGroup",
|
||||
@@ -132,7 +132,7 @@ func TestPackageModuleEnter_Injection(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePackageApiModuleEnter,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "api", "v1", "example", "enter.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/service"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/service"`,
|
||||
StructName: "FileUploadAndDownloadApi",
|
||||
AppName: "ServiceGroupApp",
|
||||
GroupName: "ExampleServiceGroup",
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
//go:build legacy_plugin_ast
|
||||
// +build legacy_plugin_ast
|
||||
|
||||
package ast
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
)
|
||||
@@ -28,7 +31,7 @@ func TestPluginEnter_Injection(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePluginApiEnter,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "plugin", "gva", "api", "enter.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/plugin/gva/service"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/plugin/gva/service"`,
|
||||
StructName: "User",
|
||||
StructCamelName: "user",
|
||||
ModuleName: "serviceUser",
|
||||
@@ -43,7 +46,7 @@ func TestPluginEnter_Injection(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePluginRouterEnter,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "plugin", "gva", "router", "enter.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/plugin/gva/api"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/plugin/gva/api"`,
|
||||
StructName: "User",
|
||||
StructCamelName: "user",
|
||||
ModuleName: "userApi",
|
||||
@@ -132,7 +135,7 @@ func TestPluginEnter_Rollback(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePluginRouterEnter,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "plugin", "gva", "router", "enter.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/plugin/gva/api"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/plugin/gva/api"`,
|
||||
StructName: "User",
|
||||
StructCamelName: "user",
|
||||
ModuleName: "userApi",
|
||||
@@ -147,7 +150,7 @@ func TestPluginEnter_Rollback(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePluginApiEnter,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "plugin", "gva", "api", "enter.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/plugin/gva/service"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/plugin/gva/service"`,
|
||||
StructName: "User",
|
||||
StructCamelName: "user",
|
||||
ModuleName: "serviceUser",
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
//go:build legacy_plugin_ast
|
||||
// +build legacy_plugin_ast
|
||||
|
||||
package ast
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
)
|
||||
@@ -25,7 +28,7 @@ func TestPluginGenModel_Injection(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePluginGen,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "plugin", "gva", "gen", "main.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/plugin/gva/model"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/plugin/gva/model"`,
|
||||
PackageName: "model",
|
||||
StructName: "User",
|
||||
IsNew: false,
|
||||
@@ -36,7 +39,7 @@ func TestPluginGenModel_Injection(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePluginGen,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "plugin", "gva", "gen", "main.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/plugin/gva/model"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/plugin/gva/model"`,
|
||||
PackageName: "model",
|
||||
StructName: "User",
|
||||
IsNew: true,
|
||||
@@ -85,7 +88,7 @@ func TestPluginGenModel_Rollback(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePluginGen,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "plugin", "gva", "gen", "main.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/plugin/gva/model"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/plugin/gva/model"`,
|
||||
PackageName: "model",
|
||||
StructName: "User",
|
||||
IsNew: false,
|
||||
@@ -96,7 +99,7 @@ func TestPluginGenModel_Rollback(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePluginGen,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "plugin", "gva", "gen", "main.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/plugin/gva/model"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/plugin/gva/model"`,
|
||||
PackageName: "model",
|
||||
StructName: "User",
|
||||
IsNew: true,
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
//go:build legacy_plugin_ast
|
||||
// +build legacy_plugin_ast
|
||||
|
||||
package ast
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
)
|
||||
@@ -25,7 +28,7 @@ func TestPluginInitializeGorm_Injection(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePluginInitializeGorm,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "plugin", "gva", "initialize", "gorm.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/plugin/gva/model"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/plugin/gva/model"`,
|
||||
StructName: "User",
|
||||
PackageName: "model",
|
||||
IsNew: false,
|
||||
@@ -36,7 +39,7 @@ func TestPluginInitializeGorm_Injection(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePluginInitializeGorm,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "plugin", "gva", "initialize", "gorm.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/plugin/gva/model"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/plugin/gva/model"`,
|
||||
StructName: "User",
|
||||
PackageName: "model",
|
||||
IsNew: true,
|
||||
@@ -47,7 +50,7 @@ func TestPluginInitializeGorm_Injection(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePluginInitializeGorm,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "plugin", "gva", "initialize", "gorm.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/plugin/gva/model"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/plugin/gva/model"`,
|
||||
StructName: "SysUser",
|
||||
PackageName: "model",
|
||||
IsNew: true,
|
||||
@@ -96,7 +99,7 @@ func TestPluginInitializeGorm_Rollback(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePluginInitializeGorm,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "plugin", "gva", "initialize", "gorm.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/plugin/gva/model"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/plugin/gva/model"`,
|
||||
StructName: "User",
|
||||
PackageName: "model",
|
||||
IsNew: false,
|
||||
@@ -107,7 +110,7 @@ func TestPluginInitializeGorm_Rollback(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePluginInitializeGorm,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "plugin", "gva", "initialize", "gorm.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/plugin/gva/model"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/plugin/gva/model"`,
|
||||
StructName: "User",
|
||||
PackageName: "model",
|
||||
IsNew: true,
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
//go:build legacy_plugin_ast
|
||||
// +build legacy_plugin_ast
|
||||
|
||||
package ast
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
)
|
||||
@@ -28,7 +31,7 @@ func TestPluginInitializeRouter_Injection(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePluginInitializeRouter,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "plugin", "gva", "initialize", "router.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/plugin/gva/router"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/plugin/gva/router"`,
|
||||
AppName: "Router",
|
||||
GroupName: "User",
|
||||
PackageName: "router",
|
||||
@@ -43,7 +46,7 @@ func TestPluginInitializeRouter_Injection(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePluginInitializeRouter,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "plugin", "gva", "initialize", "router.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/plugin/gva/router"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/plugin/gva/router"`,
|
||||
AppName: "Router",
|
||||
GroupName: "U中文",
|
||||
PackageName: "router",
|
||||
@@ -102,7 +105,7 @@ func TestPluginInitializeRouter_Rollback(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePluginInitializeRouter,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "plugin", "gva", "initialize", "router.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/plugin/gva/router"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/plugin/gva/router"`,
|
||||
AppName: "Router",
|
||||
GroupName: "User",
|
||||
PackageName: "router",
|
||||
@@ -117,7 +120,7 @@ func TestPluginInitializeRouter_Rollback(t *testing.T) {
|
||||
fields: fields{
|
||||
Type: TypePluginInitializeRouter,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "plugin", "gva", "initialize", "router.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/plugin/gva/router"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/plugin/gva/router"`,
|
||||
AppName: "Router",
|
||||
GroupName: "U中文",
|
||||
PackageName: "router",
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
//go:build legacy_plugin_ast
|
||||
// +build legacy_plugin_ast
|
||||
|
||||
package ast
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
)
|
||||
@@ -24,7 +27,7 @@ func TestPluginInitialize_Injection(t *testing.T) {
|
||||
Type: TypePluginInitializeV2,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "plugin", "gva", "plugin.go"),
|
||||
PluginPath: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "plugin", "register.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/plugin/gva"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/plugin/gva"`,
|
||||
},
|
||||
wantErr: false,
|
||||
},
|
||||
@@ -71,7 +74,7 @@ func TestPluginInitialize_Rollback(t *testing.T) {
|
||||
Type: TypePluginInitializeV2,
|
||||
Path: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "plugin", "gva", "plugin.go"),
|
||||
PluginPath: filepath.Join(global.GVA_CONFIG.AutoCode.Root, global.GVA_CONFIG.AutoCode.Server, "plugin", "register.go"),
|
||||
ImportPath: `"github.com/flipped-aurora/gin-vue-admin/server/plugin/gva"`,
|
||||
ImportPath: `"git.echol.cn/loser/Go-Web-Template/server/plugin/gva"`,
|
||||
},
|
||||
wantErr: false,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user