编译执行go mod tidy时,出现了这个错误,挺恶心的:

        xxx  requires
        github.com/micro/go-plugins@v1.3.0 requires
        k8s.io/api@v0.0.0-20190726022912-69e1bce1dad5 requires
        github.com/gogo/protobuf@v0.0.0-20190410021324-65acae22fc9: invalid pseudo-version: revision is shorter than canonical

 

        搞了大半天,终于找到原因:

        https://github.com/golang/go/issues/3439

 

        解决办法,在go.mod中加:

replace github.com/gogo/protobuf v0.0.0-20190410021324-65acae22fc9 => github.com/gogo/protobuf v0.0.0-20190723190241-65acae22fc9d

       搞定。

 

 

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐