timshannon / badgerhold

BadgerHold is an embeddable NoSQL store for querying Go types built on Badger
MIT License
515 stars 52 forks source link

Fix README + More Consistent with Badger #26

Closed wolveix closed 4 years ago

wolveix commented 4 years ago

The DefaultOptions change is technically a breaking change, but I think it helps to bring the functionality closer to Badger's own.

timshannon commented 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.

wolveix commented 4 years ago

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!

timshannon commented 4 years ago

Sure go for it, and I'll merge your PR.

Thanks!

wolveix commented 4 years ago

@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?

timshannon commented 4 years ago

Sure.