Skip to content

Commit

Permalink
Merge 13d7a52 into 7dc645f
Browse files Browse the repository at this point in the history
  • Loading branch information
wolveix committed Jul 17, 2020
2 parents 7dc645f + 13d7a52 commit b41def0
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Expand Up @@ -281,10 +281,18 @@ to create the database, create the tables you expect, and create any indexes. W
and put any type of data you want in it.

```Go
store, err := badgerhold.Open(badgerhold.DefaultOptions(filename))
options := badgerhold.DefaultOptions
options.Dir = "data"
options.ValueDir = "data"

store, err := badgerhold.Open(options)
defer store.Close()
if err != nil {
//handle error
// handle error
log.Fatal(err)
}


err = store.Insert("key", &Item{
Name: "Test Name",
Created: time.Now(),
Expand Down

0 comments on commit b41def0

Please sign in to comment.