Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBytesHash ¶
NewBytesHash returns a new hash function to hash byte slice.
Note that this function generates a random seed, each calling of this function returns DIFFERENT hash function, different hash functions generate different hash result for same input.
The returned function is safe for concurrent use by multiple goroutines.
Types ¶
type HashFunc ¶
type HashFunc[K comparable] func(key K) uintptr
func NewHashFunc ¶
func NewHashFunc[K comparable]() HashFunc[K]
NewHashFunc returns a new hash function, which exposes several hash functions in package runtime.
Note that this function generates a random seed, each calling of this function returns DIFFERENT hash function, different hash functions generate different result for same input.
The returned function is safe for concurrent use by multiple goroutines.