我的文件夹结构看起来像这样......(假设我的 git repo 名称是 demorepo)
demorepo
|--directory1
|-- (no go.mod at this level)
|--module1
|--package1 --------->--------------->--------------------->----|
|--go.mod (github.com/demorepo/directory1/module1) |
|--go.sum |
|--module2 |
|--module3 |
|--directory2 |
|-- (no go.mod at this level) |
|--newmodule ------<------------<------------------<----------------|
现在,我想在“newmodule”中使用“package1”中定义的函数
当我在“new_module”中点击 go get <repo_address>/directort1/module1/package1 时,它说....
github.com/<repo>@upgrade found (v0.0.0-20211215055943-92e412ad4a12), but does not contain package github.com/<repo>/directory1/module1/package1