peterbourgon/diskv — pull request #20 by jonboulle (2014-12-12 02:25:17+00:00)
Title: KeysPrefix: do not transform empty prefix

When KeysPrefix was introduced, the behaviour of Keys was changed: rather than
just walking from BasePath, it attempted to transform the empty prefix using
the configured BlockTransform. I do not think this is correct behaviour; it
just happened to be fine in the default case because the default transform
used in tests would simply return an empty slice, which means pathFor() would
end up returning BasePath anyway. However, BlockTransform functions should
arguably not be expected to successfully transform an empty key into an empty
slice (ours actually panics in that scenario which is how I noticed this ;-)