vgo不区分大小写的导入冲突

时间:2018-06-29 21:17:32

标签: go

我正在尝试使用vgo,但出现以下错误

$ vgo build ./...
vgo: resolving import "github.com/Sirupsen/logrus"
vgo: finding github.com/Sirupsen/logrus (latest)
vgo: adding github.com/Sirupsen/logrus v1.0.5
../../../mod/github.com/docker/go-events@v0.0.0-20170721190031-9461782956ad/broadcast.go:7:2: case-insensitive import collision: "github.com/sirupsen/logrus" and "github.com/Sirupsen/logrus"

我尝试将以下内容添加到go.mod文件中:

exclude github.com/Sirupsen/logrus v1.0.5

require (
    ...
    github.com/sirupsen/logrus v1.0.5
    ...
)

replace github.com/Sirupsen/logrus v1.0.5 => github.com/sirupsen/logrus v1.0.5

但是我得到以下信息:

$ vgo build ./...
vgo: resolving import "github.com/Sirupsen/logrus"
vgo: finding github.com/Sirupsen/logrus v1.0.4
vgo: finding github.com/Sirupsen/logrus (latest)
vgo: adding github.com/Sirupsen/logrus v1.0.4
vgo: downloading github.com/Sirupsen/logrus v1.0.4
../../../mod/github.com/docker/go-events@v0.0.0-20170721190031-9461782956ad/broadcast.go:7:2: case-insensitive import collision: "github.com/sirupsen/logrus" and "github.com/Sirupsen/logrus"

我不知道哪个软件包引起了问题。任何帮助表示感谢,谢谢。

1 个答案:

答案 0 :(得分:1)

可能是案例更改问题:Sirupsen与sirupsen。例如,众多之一,

Rename back to Sirupsen/logrus #570