go fmt, cleanup

This commit is contained in:
Roy Crihfield 2020-09-06 12:55:48 -05:00
parent 3715d87161
commit fb1768b7a9

View File

@ -37,7 +37,6 @@ func (it *PrefixBoundIterator) Next(descend bool) bool {
if !it.current.Next(descend) {
return false
}
p := it.current.Path(); if len(p) >= 4 { p = p[:4] }
// stop if underlying iterator went past endKey
cmp := bytes.Compare(it.current.Path(), it.endKey)
return cmp <= 0
@ -124,7 +123,7 @@ func (gen *prefixGenerator) Next() {
}
}
// Generates paths that cut the trie domain into "nbins" uniform bins, w/ optional prefix
// Generates paths that cut trie domain into "nbins" uniform conterminous bins (w/ opt. prefix)
// eg. MakePaths([], 2) => [[0] [8]]
// MakePaths([4], 32) => [[4 0 0] [4 0 8] [4 1 0]... [4 f 8]]
func MakePaths(prefix []byte, nbins uint) [][]byte {