go语言相关bug

第一个bug

bash 复制代码
itcast@itcast:/home/jian/share/src/go-test/homeweb-client$ go mod tidy
go: finding module for package github.com/micro/go-grpc
go: found github.com/micro/go-grpc in github.com/micro/go-grpc v1.0.1
go: homeweb-client/handler imports
	github.com/micro/go-grpc imports
	github.com/micro/go-micro imports
	github.com/micro/go-micro/cmd imports
	github.com/micro/go-micro/registry/consul imports
	github.com/hashicorp/consul/watch tested by
	github.com/hashicorp/consul/watch.test imports
	github.com/hashicorp/consul/agent imports
	github.com/hashicorp/go-discover imports
	github.com/hashicorp/go-discover/provider/azure imports
	github.com/Azure/go-autorest/autorest: ambiguous import: found package github.com/Azure/go-autorest/autorest in multiple modules:
	github.com/Azure/go-autorest v11.7.0+incompatible (/home/jian/share/pkg/mod/github.com/!azure/go-autorest@v11.7.0+incompatible/autorest)
	github.com/Azure/go-autorest/autorest v0.9.0 (/home/jian/share/pkg/mod/github.com/!azure/go-autorest/autorest@v0.9.0)
go: homeweb-client/handler imports
	github.com/micro/go-grpc imports
	github.com/micro/go-micro imports
	github.com/micro/go-micro/cmd imports
	github.com/micro/go-micro/registry/consul imports
	github.com/hashicorp/consul/watch tested by
	github.com/hashicorp/consul/watch.test imports
	github.com/hashicorp/consul/agent imports
	github.com/hashicorp/go-discover imports
	github.com/hashicorp/go-discover/provider/azure imports
	github.com/Azure/go-autorest/autorest/adal: ambiguous import: found package github.com/Azure/go-autorest/autorest/adal in multiple modules:
	github.com/Azure/go-autorest v11.7.0+incompatible (/home/jian/share/pkg/mod/github.com/!azure/go-autorest@v11.7.0+incompatible/autorest/adal)
	github.com/Azure/go-autorest/autorest/adal v0.5.0 (/home/jian/share/pkg/mod/github.com/!azure/go-autorest/autorest/adal@v0.5.0)
go: homeweb-client/handler imports
	github.com/micro/go-grpc imports
	github.com/micro/go-micro imports
	github.com/micro/go-micro/cmd imports
	github.com/micro/go-micro/registry/consul imports
	github.com/hashicorp/consul/watch tested by
	github.com/hashicorp/consul/watch.test imports
	github.com/hashicorp/consul/agent imports
	github.com/hashicorp/go-discover imports
	github.com/hashicorp/go-discover/provider/azure imports
	github.com/Azure/go-autorest/autorest/azure: ambiguous import: found package github.com/Azure/go-autorest/autorest/azure in multiple modules:
	github.com/Azure/go-autorest v11.7.0+incompatible (/home/jian/share/pkg/mod/github.com/!azure/go-autorest@v11.7.0+incompatible/autorest/azure)
	github.com/Azure/go-autorest/autorest v0.9.0 (/home/jian/share/pkg/mod/github.com/!azure/go-autorest/autorest@v0.9.0/azure)
go: homeweb-client/handler imports
	github.com/micro/go-grpc imports
	github.com/micro/go-micro imports
	github.com/micro/go-micro/cmd imports
	github.com/micro/go-micro/registry/consul imports
	github.com/hashicorp/consul/watch tested by
	github.com/hashicorp/consul/watch.test imports
	github.com/hashicorp/consul/agent imports
	github.com/hashicorp/go-discover imports
	github.com/hashicorp/go-discover/provider/azure imports
	github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network imports
	github.com/Azure/go-autorest/autorest/to: ambiguous import: found package github.com/Azure/go-autorest/autorest/to in multiple modules:
	github.com/Azure/go-autorest v11.7.0+incompatible (/home/jian/share/pkg/mod/github.com/!azure/go-autorest@v11.7.0+incompatible/autorest/to)
	github.com/Azure/go-autorest/autorest/to v0.2.0 (/home/jian/share/pkg/mod/github.com/!azure/go-autorest/autorest/to@v0.2.0)
go: homeweb-client/handler imports
	github.com/micro/go-grpc imports
	github.com/micro/go-micro imports
	github.com/micro/go-micro/cmd imports
	github.com/micro/go-micro/registry/consul imports
	github.com/hashicorp/consul/watch tested by
	github.com/hashicorp/consul/watch.test imports
	github.com/hashicorp/consul/agent imports
	github.com/hashicorp/go-discover imports
	github.com/hashicorp/go-discover/provider/azure imports
	github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network imports
	github.com/Azure/go-autorest/autorest/validation: ambiguous import: found package github.com/Azure/go-autorest/autorest/validation in multiple modules:
	github.com/Azure/go-autorest v11.7.0+incompatible (/home/jian/share/pkg/mod/github.com/!azure/go-autorest@v11.7.0+incompatible/autorest/validation)
	github.com/Azure/go-autorest/autorest/validation v0.1.0 (/home/jian/share/pkg/mod/github.com/!azure/go-autorest/autorest/validation@v0.1.0)
go: homeweb-client/handler imports
	github.com/micro/go-grpc imports
	github.com/micro/go-micro imports
	github.com/micro/go-micro/cmd imports
	github.com/micro/go-micro/registry/consul imports
	github.com/hashicorp/consul/watch tested by
	github.com/hashicorp/consul/watch.test imports
	github.com/hashicorp/consul/agent imports
	github.com/hashicorp/go-discover imports
	github.com/hashicorp/go-discover/provider/azure imports
	github.com/Azure/azure-sdk-for-go/services/network/mgmt/2015-06-15/network imports
	github.com/Azure/go-autorest/tracing: ambiguous import: found package github.com/Azure/go-autorest/tracing in multiple modules:
	github.com/Azure/go-autorest v11.7.0+incompatible (/home/jian/share/pkg/mod/github.com/!azure/go-autorest@v11.7.0+incompatible/tracing)
	github.com/Azure/go-autorest/tracing v0.5.0 (/home/jian/share/pkg/mod/github.com/!azure/go-autorest/tracing@v0.5.0)
itcast@itcast:/home/jian/share/src/go-test/homeweb-client$ ls

https://github.com/Azure/go-autorest 去这个官网去安装

bash 复制代码
go get github.com/Azure/go-autorest/autorest
go get github.com/Azure/go-autorest/autorest/azure
go get github.com/Azure/go-autorest/autorest/date
go get github.com/Azure/go-autorest/autorest/to
bash 复制代码
github.com/Shopify/sarama: github.com/Shopify/sarama@v1.42.1: parsing go.mod:
module declares its path as: github.com/IBM/sarama
        but was required as: github.com/Shopify/sarama

出现这种情况可能是版本的问题

bash 复制代码
replace github.com/golang/lint => golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3

replace github.com/testcontainers/testcontainer-go => github.com/testcontainers/testcontainers-go v0.0.2

replace github.com/envoyproxy/go-control-plane => github.com/envoyproxy/go-control-plane v0.8.1
相关推荐
StayInLove2 分钟前
G1垃圾回收器日志详解
java·开发语言
无尽的大道10 分钟前
Java字符串深度解析:String的实现、常量池与性能优化
java·开发语言·性能优化
爱吃生蚝的于勒14 分钟前
深入学习指针(5)!!!!!!!!!!!!!!!
c语言·开发语言·数据结构·学习·计算机网络·算法
binishuaio23 分钟前
Java 第11天 (git版本控制器基础用法)
java·开发语言·git
zz.YE25 分钟前
【Java SE】StringBuffer
java·开发语言
就是有点傻29 分钟前
WPF中的依赖属性
开发语言·wpf
洋24038 分钟前
C语言常用标准库函数
c语言·开发语言
进击的六角龙39 分钟前
Python中处理Excel的基本概念(如工作簿、工作表等)
开发语言·python·excel
wrx繁星点点40 分钟前
状态模式(State Pattern)详解
java·开发语言·ui·设计模式·状态模式
NoneCoder1 小时前
Java企业级开发系列(1)
java·开发语言·spring·团队开发·开发