Skip to content

Commit

Permalink
Enable Truncate option #116
Browse files Browse the repository at this point in the history
  • Loading branch information
mxpv committed Apr 14, 2020
1 parent ac8a889 commit 26e3ed4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/db/badger.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ func NewBadger(config *config.Database) (*Badger, error) {
return nil, errors.Wrap(err, "could not mkdir database dir")
}

opts := badger.DefaultOptions(dir)
opts.Logger = log.New()
opts := badger.DefaultOptions(dir).
WithLogger(log.New()).
WithTruncate(true)

db, err := badger.Open(opts)
if err != nil {
Expand Down

0 comments on commit 26e3ed4

Please sign in to comment.