我正在尝试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......
以及有关如何解决此问题的建议?