【发布时间】:2020-02-24 05:04:09
【问题描述】:
我正在尝试在我的模块中使用 grafana/grafana/pkg/tsdb 包。我不认为这个问题是 grafana 特有的,但它就是这样:
$ go get -u github.com/grafana/grafana/pkg/tsdb
go: finding github.com/inconshreveable/log15 latest
go: finding github.com/go-macaron/session latest
go: finding golang.org/x/oauth2 latest
go: finding github.com/teris-io/shortid latest
go: github.com/grafana/grafana/pkg/tsdb imports
github.com/go-xorm/core: github.com/go-xorm/core@v0.6.3: parsing go.mod:
module declares its path as: xorm.io/core
but was required as: github.com/go-xorm/core
它说包tsdb 将xorm 导入为github.com/go-xorm/core,但模块将自己声明为xorm.io/core。
查看 Grafana 的 go.mod 文件,它正在使用 github.com/go-xorm/core 并转到 github.com/go-xorm/core,它说该项目现在已存档...并且它的 go.mod 文件确实将自己声明为 xorm.io/core...
以及如何解决此问题的建议?
【问题讨论】:
标签: go go-modules go-xorm