diff --git a/internal/datastore/kvstore.go b/internal/datastore/kvstore.go index 85e7d59..7d6e6a9 100644 --- a/internal/datastore/kvstore.go +++ b/internal/datastore/kvstore.go @@ -19,8 +19,7 @@ type KVStore struct { // NewKVStore creates a new key value datastore func NewKVStore(path string) (*KVStore, error) { opts := badger.DefaultOptions(path) - opts.WithTruncate(true) - db, err := badger.Open(opts) + db, err := badger.Open(opts.WithTruncate(true)) if err != nil { return nil, errors.Wrap(err, "failed to open datastore") }