bbgo_origin/pkg/util/fnv.go

10 lines
122 B
Go
Raw Permalink Normal View History

package util
2021-03-22 09:26:06 +00:00
import "hash/fnv"
func FNV32(s string) uint32 {
2021-03-22 09:26:06 +00:00
h := fnv.New32a()
h.Write([]byte(s))
return h.Sum32()
}