1

我使用这个命令:

dep init -gopath -v

在我的 gopath 中,像这样:

gopath/src/aaa.com/bbb/ccc.v2

在我的代码中,导入是:

import ("aaa.com/bbb/ccc.v2")

最终得到了这个:

init failed: unable to determine direct dependencies: unable to deduce 
repository and source type for "aaa.com/bbb/ccc.v2": unable to 
read metadata: unable to fetch raw metadata: failed HTTP request to URL 
"http://aaa.com/bbb/ccc.v2?go-get=1": Get http://aaa.com/bbb/ccc.v2?go-get=1: context canceled

实际上,aaa.com 不存在,它只是我的 gopath 中的一个目录

为什么即使我指定了-gopath参数,dep 仍然要求网络获取元数据?

4

0 回答 0