Open jyno12 opened 10 months ago
Can you send a PR?
Running the sample code on the README
import (
"github.com/dgraph-io/badger/v4"
c "github.com/ostafen/clover"
badgerstore "github.com/ostafen/store/badger"
)
func main() {
// use OpenWithStore() if you want to select a different storage backend
store, _ := badgerstore.Open(badger.DefaultOptions("").WithInMemory(true)) // opens a badger in memory database
db, _ := c.OpenWithStore(store)
defer db.Close() // remember to close the db when you have done
}
Output
main.go:5:2: no required module provides package github.com/ostafen/clover; to add it:
go get github.com/ostafen/clover
main.go:6:2: no required module provides package github.com/ostafen/store/badger; to add it:
However, changing the import statement to
import (
"github.com/dgraph-io/badger/v4"
c "github.com/ostafen/clover/v2"
badgerstore "github.com/ostafen/clover/v2/store/badger"
)
The packages are imported correctly. I can send in a PR if need be
these example code in readme file cause some error.
github.com/ostafen/store
dosen't exist now. We can use the code in the db_test file as follows