Badger: Go module is still not supported

Created on 9 Dec 2019  路  2Comments  路  Source: dgraph-io/badger

What version of Go are you using (go version)?

go 1.12

What version of Badger are you using?

v1.5.5, v2.0

Does this issue reproduce with the latest master?

main.go

package main
import (
    "github.com/dgraph-io/badger"
)
type A struct {
    db *badger.DB
}
func main() {
}

go.mod

module app3
go 1.12
require (
    github.com/dgraph-io/badger v2.0
)

What did you do?

  1. go mod init app3
  2. modify go.mod to add version
  3. go build .

What did you expect to see?

app3 should be built successfully

What did you see instead?

go: finding github.com/dgryski/go-farm latest
go: finding github.com/AndreasBriese/bbloom latest
go: extracting github.com/dgryski/go-farm v0.0.0-20191112170834-c2139c5d712b
go: extracting github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96
build app3: cannot load github.com/AndreasBriese/bbloom: cannot find module providing package github.com/AndreasBriese/bbloom

kinquestion statumore-info-needed

All 2 comments

Have you tried putting v2.0.0 instead of v2.0 in your go.mod file and changing the import path to github.com/dgraph-io/badger/v2?

@hikingpig Please try using github.com/dgraph-io/badger/v2 as the import path.

Was this page helpful?
0 / 5 - 0 ratings