db: test panic on nil key

This commit is contained in:
Ethan Buchman
2017-12-12 18:42:47 -05:00
parent 781f6c5d22
commit 5b7f90dfb2
5 changed files with 77 additions and 17 deletions

View File

@ -121,3 +121,10 @@ type Iterator interface {
func bz(s string) []byte {
return []byte(s)
}
// All DB funcs should panic on nil key.
func panicNilKey(key []byte) {
if key == nil {
panic("nil key")
}
}