我有Go Dep项目。我想使用go模块作为依赖项。例如。我需要这个https://github.com/pion/webrtc。
因此,我尝试在Gopkg.toml中声明这种依赖关系:
[[constraint]]
name = "github.com/pion/webrtc"
revision = "6a0b7020b1724dcb302ddfadab0c80fabc144c97"
当我这样做时dep ensure
,我得到了错误:
Solving failure: No versions of github.com/pion/webrtc met constraints:
6a0b7020b1724dcb302ddfadab0c80fabc144c97: "github.com/pion/webrtc" imports "github.com/pion/webrtc/v2/pkg/rtcerr", which con
tains malformed code: no package exists at "github.com/pion/webrtc/v2/pkg/rtcerr"
v2.0.14: Could not introduce github.com/pion/[email protected], as it is not allowed by constraint 6a0b7020b1724dcb302ddfadab0c
80fabc144c97 from project ***.
v2.0.13: Could not introduce github.com/pion/[email protected], as it is not allowed by constraint 6a0b7020b1724dcb302ddfadab0c
80fabc144c97 from project ***.
看来,问题与2版本的库有关。当它为1时,一切正常。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句