Skip to content

Commit

Permalink
updated readme to match the v2 API (#144)
Browse files Browse the repository at this point in the history
- updated import statement to correct path to badger store
- removed Open example with in memory option, not available anymore in v2
  • Loading branch information
pricelessrabbit authored Jan 27, 2024
1 parent 8d42e7f commit cb5ffd6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import (
"log"
"github.com/dgraph-io/badger/v4"
c "github.com/ostafen/clover"
badgerstore "github.com/ostafen/store/badger"
badgerstore "github.com/ostafen/clover/v2/store/badger"
)

...
Expand All @@ -64,9 +64,6 @@ db, _ := c.Open("clover-db")
store, _ := badgerstore.Open(badger.DefaultOptions("").WithInMemory(true)) // opens a badger in memory database
db, _ := c.OpenWithStore(store)

// or, if you don't need persistency
db, _ := c.Open("", c.InMemoryMode(true))

defer db.Close() // remember to close the db when you have done
```

Expand Down

0 comments on commit cb5ffd6

Please sign in to comment.