Update hashcode.go

Updating the comment `we need and non negative integer` to `we need a non negative integer`
pull/25019/head
Ganesh Prasad Kumble 6 years ago committed by GitHub
parent df39e0a806
commit ae717e6175
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -9,7 +9,7 @@ import (
// String hashes a string to a unique hashcode.
//
// crc32 returns a uint32, but for our use we need
// and non negative integer. Here we cast to an integer
// a non negative integer. Here we cast to an integer
// and invert it if the result is negative.
func String(s string) int {
v := int(crc32.ChecksumIEEE([]byte(s)))

Loading…
Cancel
Save