wangpengfei
2023-08-25 25c573d55986e02cf5f70cc3868e2b94a4be98e2
utils/ast/ast_rollback.go
@@ -3,13 +3,13 @@
import (
   "bytes"
   "fmt"
   "github.com/flipped-aurora/gin-vue-admin/server/global"
   "go/ast"
   "go/parser"
   "go/printer"
   "go/token"
   "os"
   "path/filepath"
   "srm/global"
)
func RollBackAst(pk, model string) {
@@ -70,7 +70,7 @@
         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 == "\"srm/model/"+pk+"\"" {
                     gp = gen
                     imI = i
                     return false