Go Modules on Badger and Dgraph

The idea is that everyone who uses v2 should import it as "github.com/dgraph-io/badger/v2". Not just modules users.

Here’s how I’d release v2 of badger=:

  • Make a directory in the badger repo called v2.
  • Put the v2 badger packages inside the v2 directory, and update their import paths to begin with "github.com/dgraph-io/badger/v2"
  • Put a go.mod file in the v2 directory with the declaration module github.com/dgraph-io/badger/v2.
  • Commit all of that, and tag it with v2.0.0.

Then users of badger v2, whether they us modules or not, should import it with the v2 import path. That should work for everyone, right?