Reputation: 2280
I try to use https://pkg.go.dev/github.com/steakknife/bloomfilter but its Add()
method requires a hash.Hash64, how can I convert a string (or []byte) to hash.Hash64?
Upvotes: 0
Views: 990
Reputation: 194
A simple way is this:
myString := "hello world"
myHash := fnv.New64()
myHash.Write([]byte(myString))
Upvotes: 1