【发布时间】:2022-01-20 23:35:45
【问题描述】:
谁能帮我解决以下问题: 我有 2 个私有 git 存储库 private1 和 private2。 我需要将一个包从 repo private1 导入到 private2。 repo private1 的结构如下:
私人1--
|
|- actions --
| | - go.sum
| | - go.mod (github.xyz.com/private1/actions)
| | - commons -- (package commons)
| | - commons.go
|-operations--
| | - go.sum
| | - go.mod (github.xyz.com/private1/actions)
| | - interceptor --
| | - interceptor.go
我想在我的另一个仓库 private2 中导入包“commons”。 repo private 2 的 go.mod 应该添加什么? 如果我使用 'github.xyz.com/private1/actions' ,我会收到以下错误 去:github.xyz.com/private1/actions@v0.0.0-20211203184031-723259d523a2:无法识别的导入路径“github.xyz.com/private1/actions'”:阅读https://github.xyz.com/private1/actions?go-get=1:404 Not Found
【问题讨论】:
-
您的“git 存储库”(模块)是本地计算机还是远程存储(如 github 中)?
-
@Praveen 它们存储在 github 中。
标签: go import multi-module