From 87fd84dec8a0062dbce7ca762db25abda873193c Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Fri, 21 Feb 2020 11:20:34 +0200 Subject: [PATCH] add missing package to README for badger.NewEntry --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2f6599602..25fc2a4e9 100644 --- a/README.md +++ b/README.md @@ -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 }) @@ -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 }) @@ -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 }) @@ -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 })