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/[email protected]+incompatible/autorest)
	github.com/Azure/go-autorest/autorest v0.9.0 (/home/jian/share/pkg/mod/github.com/!azure/go-autorest/[email protected])
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/[email protected]+incompatible/autorest/adal)
	github.com/Azure/go-autorest/autorest/adal v0.5.0 (/home/jian/share/pkg/mod/github.com/!azure/go-autorest/autorest/[email protected])
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/[email protected]+incompatible/autorest/azure)
	github.com/Azure/go-autorest/autorest v0.9.0 (/home/jian/share/pkg/mod/github.com/!azure/go-autorest/[email protected]/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/[email protected]+incompatible/autorest/to)
	github.com/Azure/go-autorest/autorest/to v0.2.0 (/home/jian/share/pkg/mod/github.com/!azure/go-autorest/autorest/[email protected])
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/[email protected]+incompatible/autorest/validation)
	github.com/Azure/go-autorest/autorest/validation v0.1.0 (/home/jian/share/pkg/mod/github.com/!azure/go-autorest/autorest/[email protected])
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/[email protected]+incompatible/tracing)
	github.com/Azure/go-autorest/tracing v0.5.0 (/home/jian/share/pkg/mod/github.com/!azure/go-autorest/[email protected])
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/[email protected]: 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
相关推荐
王磊鑫1 分钟前
重返JAVA之路-初识JAVA
java·开发语言
千野竹之卫1 分钟前
3D珠宝渲染用什么软件比较好?渲染100邀请码1a12
开发语言·前端·javascript·3d·3dsmax
liuluyang5301 小时前
C语言C11支持的结构体嵌套的用法
c语言·开发语言·算法·编译·c11
凌叁儿1 小时前
python保留关键字详解
开发语言·python
明飞19872 小时前
C_内存 内存地址概念
c语言·开发语言
代码不停2 小时前
Java中的异常
java·开发语言
兮兮能吃能睡2 小时前
Python中的eval()函数详解
开发语言·python
狄加山6753 小时前
Qt模型-视图架构
开发语言·qt
Aphelios3803 小时前
TaskFlow开发日记 #1 - 原生JS实现智能Todo组件
java·开发语言·前端·javascript·ecmascript·todo
odoo中国3 小时前
Python 深度学习实战 第1章 什么是深度学习&代码示例
开发语言·python·深度学习