examples
examples copied to clipboard
Potential import collision: import path should be "go.etcd.io/bbolt", not "github.com/etcd-io/bbolt"
Background
The etcd-io/bbolt
has already renamed it’s import path from "github.com/etcd-io/bbolt" to "go.etcd.io/bbolt".
As etcd-io/bbolt README.md said, downstream repos should use "go.etcd.io/bbolt" to get or import etcd-io/bbolt
.
But iris-contrib/examples
still used the old path:
https://github.com/iris-contrib/examples/blob/v12/tutorial/url-shortener/go.mod#L6
github.com/etcd-io/bbolt v1.3.3
When you use the old path "github.com/etcd-io/bbolt" to import the etcd-io/bbolt
, will reintroduces etcd-io/bbolt
through the import statements "import go.etcd.io/bbolt" in the go source file of etcd-io/bbolt
.
https://github.com/etcd-io/bbolt/blob/v1.3.3/cursor_test.go#L14
package bbolt_test
import (
bolt "go.etcd.io/bbolt"
…
)
The "go.etcd.io/bbolt" and "github.com/etcd-io/bbolt" are the same repos. This will work in isolation, bring about potential risks and problems.
So, why not get rid of the old import path "github.com/etcd-io/bbolt", use "go.etcd.io/bbolt" instead.
Solution
Replace all the old import paths, change "github.com/etcd-io/bbolt"
to "go.etcd.io/bbolt "
.
Where did you import it: https://github.com/iris-contrib/examples/search?q=github.com%2Fetcd-io%2Fbbolt&unscoped_q=github.com%2Fetcd-io%2Fbbolt
@kataras Could you help me review this issue? Thx :p
Yes @KateGo520, this is already fixed two months ago look here. The iris-contrib/examples repository is a clone of kataras/iris/_examples. The v12 branch cannot be modified until the next release of Iris. This repository is not synchronized yet with the latest kataras/iris/_examples, probably will do it now.
@kataras Thank you for your reply! Looking forward to the synchronized iris-contrib/examples
.
They are now :) you welcome!