Closed wolveix closed 4 years ago
So I chose that API specifically cause it matches the API in BoltHold, which came first and whose interface was inspired by Bolt. I specifically chose that so that bolthold and badgerhold could be swapped out fairly easily (https://tech.townsourced.com/post/boltdb-vs-badger/#summary).
The idea being that Badger and Bolt both have different use cases and excel better in different situations, but you don't always know that when starting a project. Using something like Bolthold/BadgerHold allows you easily switch between the two if needed.
Yeah I figured as much, that makes sense. But the example in the README didn't work, which was the original reason for the PR. I'm happy to revert the DefaultOptions
change though!
Sure go for it, and I'll merge your PR.
Thanks!
@timshannon Thanks! I just made an additional commit as I forgot to revert the README to the original DefaultOptions
, looks like it was a minute too late though. Want me to open another PR for it?
Sure.
DefaultOptions
variable to a function to more closely resemble BadgerThe
DefaultOptions
change is technically a breaking change, but I think it helps to bring the functionality closer to Badger's own.