cmd/go: auto-find module from package import #43493
In my company, There're many packages local and saved in restricted git repo.
To import those pkgs, I'm doing like :
package main import ( "xxx" )
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
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:
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