diff options
author | Christopher Speller <crspeller@gmail.com> | 2018-08-28 10:05:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-28 10:05:26 -0700 |
commit | 61e27beabc9804fdcf59ed9df2180802175a4f70 (patch) | |
tree | 52c86f5cdbd4e13d05b8f9dddad1a01b88e26cab /vendor/github.com/go-redis/redis/internal/hashtag | |
parent | 347ee1d205c95f5fd766e206cc65bfb9782a2623 (diff) | |
download | chat-61e27beabc9804fdcf59ed9df2180802175a4f70.tar.gz chat-61e27beabc9804fdcf59ed9df2180802175a4f70.tar.bz2 chat-61e27beabc9804fdcf59ed9df2180802175a4f70.zip |
Updating dependancies. (#9303)
Diffstat (limited to 'vendor/github.com/go-redis/redis/internal/hashtag')
-rw-r--r-- | vendor/github.com/go-redis/redis/internal/hashtag/hashtag.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vendor/github.com/go-redis/redis/internal/hashtag/hashtag.go b/vendor/github.com/go-redis/redis/internal/hashtag/hashtag.go index 8c7ebbfa6..22f5b3981 100644 --- a/vendor/github.com/go-redis/redis/internal/hashtag/hashtag.go +++ b/vendor/github.com/go-redis/redis/internal/hashtag/hashtag.go @@ -5,7 +5,7 @@ import ( "strings" ) -const SlotNumber = 16384 +const slotNumber = 16384 // CRC16 implementation according to CCITT standards. // Copyright 2001-2010 Georges Menie (www.menie.org) @@ -56,7 +56,7 @@ func Key(key string) string { } func RandomSlot() int { - return rand.Intn(SlotNumber) + return rand.Intn(slotNumber) } // hashSlot returns a consistent slot number between 0 and 16383 @@ -66,7 +66,7 @@ func Slot(key string) int { return RandomSlot() } key = Key(key) - return int(crc16sum(key)) % SlotNumber + return int(crc16sum(key)) % slotNumber } func crc16sum(key string) (crc uint16) { |