commit
8163c9771a
|
@ -9,7 +9,7 @@ import (
|
|||
// String hashes a string to a unique hashcode.
|
||||
//
|
||||
// crc32 returns a uint32, but for our use we need
|
||||
// and non negative integer. Here we cast to an integer
|
||||
// a non negative integer. Here we cast to an integer
|
||||
// and invert it if the result is negative.
|
||||
func String(s string) int {
|
||||
v := int(crc32.ChecksumIEEE([]byte(s)))
|
||||
|
|
Loading…
Reference in New Issue