bbgo_origin/pkg/exchange/max/group_id.go
2021-03-22 17:32:22 +08:00

10 lines
131 B
Go

package max
import "hash/fnv"
func GenerateGroupID(s string) uint32 {
h := fnv.New32a()
h.Write([]byte(s))
return h.Sum32()
}