You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import (
"github.com/dgraph-io/badger/v4"
c "github.com/ostafen/clover"
badgerstore "github.com/ostafen/store/badger"
)
funcmain() {
// use OpenWithStore() if you want to select a different storage backendstore, _:=badgerstore.Open(badger.DefaultOptions("").WithInMemory(true)) // opens a badger in memory databasedb, _:=c.OpenWithStore(store)
deferdb.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 followsThe text was updated successfully, but these errors were encountered: