[英]Cannot install golint package: wrong import path
I have a project that uses golint and installs it inside the docker container.我有一个使用 golint 并将其安装在 docker 容器内的项目。 It have been working ok for months (and have been built multiple times), but today when I build the container again I get the following error: go get -u github.com/golang/lint/golint
它已经运行了几个月(并且已经构建了多次),但是今天当我再次构建容器时出现以下错误: go get -u github.com/golang/lint/golint
package github.com/golang/lint/golint:
code in directory /a-go-path/golang/lint/golint expects import "golang.org/x/lint/golint"
I can replicate the issue locally on my computer by typing go get github.com/golang/lint/golint.我可以通过键入 go get github.com/golang/lint/golint 在我的计算机上本地复制该问题。 I have deleted all the packages related to golint in the go path (source and bin folders), still when I try to install it again I get the former error.
我已经删除了 go 路径(源和 bin 文件夹)中与 golint 相关的所有包,但当我再次尝试安装它时,我仍然收到以前的错误。 I am using go 1.11.0 Any recommendations?
我正在使用 go 1.11.0 有什么建议吗?
You are supposed to use go get -u golang.org/x/lint/golint
to install golint
.您应该使用
go get -u golang.org/x/lint/golint
golint
来安装golint
。 Note that this is exactly the URL in the error message.请注意,这正是错误消息中的 URL。
You'll need to modify the image you use to build the container to use this URL.您需要修改用于构建容器的图像以使用此 URL。
It started to happen yesterday due to this commit (they added golang.org/x/lint/golint
as the import path).由于这次提交,它昨天开始发生(他们添加了
golang.org/x/lint/golint
作为导入路径)。 See this issue for more information.有关更多信息,请参阅此问题。
go get -u golang.org/x/lint/golint
它已经更新到这个
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.