Skip to content

Commit

Permalink
use WithCommand properly
Browse files Browse the repository at this point in the history
  • Loading branch information
k-grant committed Aug 10, 2020
1 parent d47b991 commit e5f9dbf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/datastore/kvstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit e5f9dbf

Please sign in to comment.