zhangqian
2023-08-26 5193dcb9336e853502baf8a539d3f45efebe2f86
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