diff --git a/db.go b/db.go index b7504a6..0d9e7e3 100644 --- a/db.go +++ b/db.go @@ -167,7 +167,7 @@ type DB struct { // Make sure to call Close after you're done. func Open(dir string, options ...Option) (*DB, error) { db := &DB{ - badgerOptions: badger.DefaultOptions, + badgerOptions: badger.DefaultOptions(dir), codec: jsoncodec.Codec{}, } diff --git a/go.mod b/go.mod index 1bb2189..c9089f7 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.12 require ( github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9 // indirect github.com/deckarep/golang-set v1.7.1 // indirect - github.com/dgraph-io/badger v2.0.0-rc.2+incompatible + github.com/dgraph-io/badger v2.0.0-rc2+incompatible github.com/dgryski/go-farm v0.0.0-20190323231341-8198c7b169ec // indirect github.com/dustin/go-humanize v1.0.0 // indirect github.com/golang/protobuf v1.3.1 // indirect diff --git a/go.sum b/go.sum index 7a6e1ed..c238e1e 100644 --- a/go.sum +++ b/go.sum @@ -6,6 +6,8 @@ github.com/deckarep/golang-set v1.7.1 h1:SCQV0S6gTtp6itiFrTqI+pfmJ4LN85S1YzhDf9r github.com/deckarep/golang-set v1.7.1/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= github.com/dgraph-io/badger v2.0.0-rc.2+incompatible h1:7KPp6xv5+wymkVUbkAnZZXvmDrJlf09m/7u1HG5lAYA= github.com/dgraph-io/badger v2.0.0-rc.2+incompatible/go.mod h1:VZxzAIRPHRVNRKRo6AXrX9BJegn6il06VMTZVJYCIjQ= +github.com/dgraph-io/badger v2.0.0-rc2+incompatible h1:6fXfqViMStaKb73bxivvD9hgwYdWyiEKzwWNVkXhslE= +github.com/dgraph-io/badger v2.0.0-rc2+incompatible/go.mod h1:VZxzAIRPHRVNRKRo6AXrX9BJegn6il06VMTZVJYCIjQ= github.com/dgryski/go-farm v0.0.0-20190323231341-8198c7b169ec h1:sElGDs3V8VdCxH5tWi0ycWJzteOPLJ3HtItSSKI95PY= github.com/dgryski/go-farm v0.0.0-20190323231341-8198c7b169ec/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=