You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The gorm/gen use go/build:Default.Import to collect the interface file path when using ApplyInterface, and the Default.Import will running go list command which find the go executable by runtime.GOROOT(), but the runtime.GOROOT() return value will invalid in some scenarios such as my playground code. See more about the runtime.GOROOT()here.
Maybe golang.org/x/tools/go/packages is a better alternatives.
GORM Playground Link
make sure your GOROOT is not
/usr/local/go
before running the playgroundgo-gorm/playground#642
Description
The gorm/gen use
go/build:Default.Import
to collect the interface file path when usingApplyInterface
, and theDefault.Import
will runninggo list
command which find the go executable byruntime.GOROOT()
, but theruntime.GOROOT()
return value will invalid in some scenarios such as my playground code. See more about theruntime.GOROOT()
here.Maybe
golang.org/x/tools/go/packages
is a better alternatives.The text was updated successfully, but these errors were encountered: