cmd/go: auto-find module from package import #43493
Open
Labels
Milestone
Comments
It seems like this would be non-deterministic if two packages have the same name. |
This is probably not feasible. The module cache ( Is there a reason you can't use one of the workflows for private repositories described in Private modules? In most cases, you'd name your module after the repository URL (like |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In my company, There're many packages local and saved in restricted git repo.
To import those pkgs, I'm doing like :
Desperately xxx module not found. Even if I've already put xxx into $GOPATH/pkg/mod/xxx.
To fix this ,I must type
It seems estremely bad and extra. Because once I put my projects not in GOPATH/src, the replace will changed to
../../../../path-togopath/pkg/mod/xxx
. Also it doesnt support 'replace xxx $GOPATH/pkg/mod/xxx'.Suggest full path or from root?
No, because a repo will be developed by all kinds of os, besides, remote machie and local machine might have different root format.
Thus, I hope gomodule can support auto-find pkg. It seems easy realized just like GOPATH.
Just throw 'replace' and 'require' away on this case!
The text was updated successfully, but these errors were encountered: