mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 02:44:59 +00:00
unexport cluster's newhasher func
This commit is contained in:
parent
197f491b29
commit
f78af41565
2 changed files with 3 additions and 3 deletions
|
|
@ -839,8 +839,8 @@ type Hasher interface {
|
|||
Hash(key uint64, n int) int
|
||||
}
|
||||
|
||||
// NewHasher returns a new instance of the default hasher.
|
||||
func NewHasher() Hasher { return &jmphasher{} }
|
||||
// newHasher returns a new instance of the default hasher.
|
||||
func newHasher() Hasher { return &jmphasher{} }
|
||||
|
||||
// jmphasher represents an implementation of jmphash. Implements Hasher.
|
||||
type jmphasher struct{}
|
||||
|
|
|
|||
|
|
@ -373,7 +373,7 @@ func TestHasher(t *testing.T) {
|
|||
{0x0ddc0ffeebadf00d, []int{0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 15, 15, 15, 15}},
|
||||
} {
|
||||
for i, v := range tt.bucket {
|
||||
if got := NewHasher().Hash(tt.key, i+1); got != v {
|
||||
if got := newHasher().Hash(tt.key, i+1); got != v {
|
||||
t.Errorf("hash(%v,%v)=%v, want %v", tt.key, i+1, got, v)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue