Skip to content

Commit 4de06e9

Browse files
committed
hash: add ToHash func
1 parent 6e9cde2 commit 4de06e9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

hash.go

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ import (
55
"hash/fnv"
66
)
77

8+
// ToHash returns the fvn.Hash64 hash sum from uint64 value.
9+
func ToHash(val uint64) uint64 {
10+
return uint2hash(val)
11+
}
12+
813
func str2hash(val string) uint64 {
914
h := fnv.New64a()
1015
_, _ = h.Write([]byte(val))

0 commit comments

Comments
 (0)