A library to calculate hashed-based key distribution
$ go get github.com/arnour/spread-go
// Create a spread instance
spreader := spread.New(nil)
// you could also use different hash implamentations
// spreader := spread.New(sha256.New())
keyValue := "my-key-to-hash"
fraction := spreader.Key(keyValue)
fmt.Println(fraction) // 0.804535691348
$ make test