Added check for diff ignores

This commit is contained in:
2018-03-09 13:42:45 +01:00
parent c95355383e
commit 8a57178664
9 changed files with 88 additions and 46 deletions

View File

@ -2,6 +2,13 @@ package utils
import "github.com/OneOfOne/xxhash"
// HashString returns a hash of the string.
func HashString(item string) uint64 {
h := xxhash.NewS64(0)
h.Write([]byte(item))
return h.Sum64()
}
// HashStringsNoOrder returns a hash of the string slice contents, ignoring order.
func HashStringsNoOrder(items []string) uint64 {
sum := uint64(0)