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
Is your feature request related to a problem? Please describe.
when creating new project using goctl api new xxx inside of a go workspace, it will failed: "no matched module"
Describe the solution you'd like
goctl can auto detect go workspace, if new project is inside of a go workspace, goctl should handle it, make sure the project is created.
Describe alternatives you've considered
Additional context
goctl use go list -json -m to find current project's go module here, but in go workspace, this command only returns modules that declared in go.work.
I tried add project into go.work after go mod is initialized, and it works.
maybe this is not the best practice but hope it can to be helpful.
btw, I find goctl use go list -m -f '{{.GoMod}}' to check if the current path is a go module here, but in go workspace, this command could be inaccurate. go env GOMOD should be better? if the current path is not a go module, it will return "/dev/null".
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
when creating new project using
goctl api new xxx
inside of a go workspace, it will failed: "no matched module"Describe the solution you'd like
goctl can auto detect go workspace, if new project is inside of a go workspace, goctl should handle it, make sure the project is created.
Describe alternatives you've considered
Additional context
goctl use
go list -json -m
to find current project's go module here, but in go workspace, this command only returns modules that declared in go.work.I tried add project into go.work after go mod is initialized, and it works.
btw, I find goctl use
go list -m -f '{{.GoMod}}'
to check if the current path is a go module here, but in go workspace, this command could be inaccurate.go env GOMOD
should be better? if the current path is not a go module, it will return "/dev/null".The text was updated successfully, but these errors were encountered: