boltdb/bolt — pull request #190 by mkobetic (2014-06-11 21:51:52+00:00)
Title: Add Cursor.Delete()

The motivation for this PR is our use case where we need to delete potentially large sequences of keys from a bucket. It is natural to use a Cursor to iterate over the keys, however the only way to delete a key is via Bucket.Delete(key) which internally creates another cursor, seeks to the key that we're currently at and then finally deletes it. Having Cursor.Delete() avoids repetitive, unnecessary seeking. The proposed Cursor.Delete() is semantically equivalent to Bucket.Delete(key) minus the overhead.

@benbjohnson
/cc @snormore, @charlescng