super-graph/serv/utils.go

13 lines
191 B
Go
Raw Normal View History

2019-04-19 07:55:03 +02:00
package serv
2019-05-13 01:27:26 +02:00
import "github.com/cespare/xxhash/v2"
2019-04-19 07:55:03 +02:00
2019-05-13 01:27:26 +02:00
func mkkey(h *xxhash.Digest, k1 string, k2 string) uint64 {
h.WriteString(k1)
h.WriteString(k2)
v := h.Sum64()
h.Reset()
2019-04-19 07:55:03 +02:00
2019-05-13 01:27:26 +02:00
return v
2019-04-19 07:55:03 +02:00
}