Skip to content

Commit

Permalink
Add missing package to README for badger.NewEntry (#1223)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dieterbe authored Feb 24, 2020
1 parent 78d405a commit 8734e3a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ on it.

```go
err := db.Update(func(txn *badger.Txn) error {
e := NewEntry([]byte("answer"), []byte("42"))
e := badger.NewEntry([]byte("answer"), []byte("42"))
err := txn.SetEntry(e)
return err
})
Expand Down Expand Up @@ -401,7 +401,7 @@ and `Txn.SetEntry()` API methods.

```go
err := db.Update(func(txn *badger.Txn) error {
e := NewEntry([]byte("answer"), []byte("42")).WithTTL(time.Hour)
e := badger.NewEntry([]byte("answer"), []byte("42")).WithTTL(time.Hour)
err := txn.SetEntry(e)
return err
})
Expand All @@ -414,7 +414,7 @@ metadata can be set using `Entry.WithMeta()` and `Txn.SetEntry()` API methods.

```go
err := db.Update(func(txn *badger.Txn) error {
e := NewEntry([]byte("answer"), []byte("42")).WithMeta(byte(1))
e := badger.NewEntry([]byte("answer"), []byte("42")).WithMeta(byte(1))
err := txn.SetEntry(e)
return err
})
Expand All @@ -425,7 +425,7 @@ then can be set using `Txn.SetEntry()`.

```go
err := db.Update(func(txn *badger.Txn) error {
e := NewEntry([]byte("answer"), []byte("42")).WithMeta(byte(1)).WithTTL(time.Hour)
e := badger.NewEntry([]byte("answer"), []byte("42")).WithMeta(byte(1)).WithTTL(time.Hour)
err := txn.SetEntry(e)
return err
})
Expand Down

0 comments on commit 8734e3a

Please sign in to comment.