go-admin icon indicating copy to clipboard operation
go-admin copied to clipboard

[BUG] window10 生成代码时,生成失败,提示: expected 'IDENT', found 'import'

Open ocaraworks opened this issue 3 years ago • 1 comments

bug 描述 [详细地描述 bug,让大家都能理解]

window10 生成代码时,生成失败,提示: expected 'IDENT', found 'import'

复现步骤 [清晰描述复现步骤,让别人也能看到问题]

期望结果 [描述你原本期望看到的结果]

复现代码 [提供可复现的代码,仓库,或线上示例]

版本信息:

  • GoAdmin 版本:
  • golang 版本:
  • 浏览器环境:
  • 开发环境:

其他信息 [如截图等其他信息可以贴在这里]


2022-02-20T13:03:08.333+0800	ERROR	controller/new.go:118	insert data error: 4:1: expected 'IDENT', found 'import'
github.com/GoAdminGroup/go-admin/plugins/admin/controller.(*Handler).NewForm
	C:/Users/keter/go/pkg/mod/github.com/!go!admin!group/[email protected]/plugins/admin/controller/new.go:118
github.com/GoAdminGroup/go-admin/context.(*Context).Next
	C:/Users/keter/go/pkg/mod/github.com/!go!admin!group/[email protected]/context/context.go:101
github.com/GoAdminGroup/go-admin/plugins/admin/modules/guard.(*Guard).NewForm
	C:/Users/keter/go/pkg/mod/github.com/!go!admin!group/[email protected]/plugins/admin/modules/guard/new.go:121
github.com/GoAdminGroup/go-admin/context.(*Context).Next
	C:/Users/keter/go/pkg/mod/github.com/!go!admin!group/[email protected]/context/context.go:101
github.com/GoAdminGroup/go-admin/plugins/admin/modules/guard.(*Guard).CheckPrefix
	C:/Users/keter/go/pkg/mod/github.com/!go!admin!group/[email protected]/plugins/admin/modules/guard/guard.go:51
github.com/GoAdminGroup/go-admin/context.(*Context).Next
	C:/Users/keter/go/pkg/mod/github.com/!go!admin!group/[email protected]/context/context.go:101
github.com/GoAdminGroup/go-admin/modules/auth.(*Invoker).Middleware.func1
	C:/Users/keter/go/pkg/mod/github.com/!go!admin!group/[email protected]/modules/auth/middleware.go:132
github.com/GoAdminGroup/go-admin/context.(*Context).Next
	C:/Users/keter/go/pkg/mod/github.com/!go!admin!group/[email protected]/context/context.go:101
github.com/GoAdminGroup/go-admin/plugins/admin.(*Admin).globalErrorHandler
	C:/Users/keter/go/pkg/mod/github.com/!go!admin!group/[email protected]/plugins/admin/router.go:106
github.com/GoAdminGroup/go-admin/context.(*Context).Next
	C:/Users/keter/go/pkg/mod/github.com/!go!admin!group/[email protected]/context/context.go:101
github.com/GoAdminGroup/go-admin/adapter/gf.(*Gf).AddHandler.func1
	C:/Users/keter/go/pkg/mod/github.com/!go!admin!group/[email protected]/adapter/gf/gf.go:104
github.com/gogf/gf/net/ghttp.(*middleware).callHandlerFunc.func1
	C:/Users/keter/go/pkg/mod/github.com/gogf/[email protected]/net/ghttp/ghttp_request_middleware.go:130
github.com/gogf/gf/net/ghttp.niceCallFunc
	C:/Users/keter/go/pkg/mod/github.com/gogf/[email protected]/net/ghttp/ghttp_func.go:52
github.com/gogf/gf/net/ghttp.(*middleware).callHandlerFunc
	C:/Users/keter/go/pkg/mod/github.com/gogf/[email protected]/net/ghttp/ghttp_request_middleware.go:128
github.com/gogf/gf/net/ghttp.(*middleware).Next.func1.4
	C:/Users/keter/go/pkg/mod/github.com/gogf/[email protected]/net/ghttp/ghttp_request_middleware.go:89
github.com/gogf/gf/net/ghttp.niceCallFunc
	C:/Users/keter/go/pkg/mod/github.com/gogf/[email protected]/net/ghttp/ghttp_func.go:52
github.com/gogf/gf/net/ghttp.(*middleware).Next.func1
	C:/Users/keter/go/pkg/mod/github.com/gogf/[email protected]/net/ghttp/ghttp_request_middleware.go:88
github.com/gogf/gf/util/gutil.TryCatch
	C:/Users/keter/go/pkg/mod/github.com/gogf/[email protected]/util/gutil/gutil.go:46
github.com/gogf/gf/net/ghttp.(*middleware).Next
	C:/Users/keter/go/pkg/mod/github.com/gogf/[email protected]/net/ghttp/ghttp_request_middleware.go:48
github.com/gogf/gf/net/ghttp.(*Server).ServeHTTP
	C:/Users/keter/go/pkg/mod/github.com/gogf/[email protected]/net/ghttp/ghttp_server_handler.go:134
net/http.serverHandler.ServeHTTP
	C:/Program Files/Go/src/net/http/server.go:2867
net/http.(*conn).serve
	C:/Program Files/Go/src/net/http/server.go:1932

ocaraworks avatar Feb 20 '22 05:02 ocaraworks

@ocaraworks 执行了哪些命令呢?对应的版本是什么,必现的吗?

chenhg5 avatar Feb 21 '22 00:02 chenhg5