1 Star 2 Fork 1

tym_hmm / kafka-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Utils.go 214 Bytes
一键复制 编辑 原始数据 按行查看 历史
package kafka_go
import "hash/crc32"
/**
计算hashcode唯一值
*/
func hashCode(s string) int64 {
v := int64(crc32.ChecksumIEEE([]byte(s)))
if v >= 0 {
return v
}
if -v >= 0 {
return -v
}
return -1
}
Go
1
https://gitee.com/tym_hmm/kafka-go.git
git@gitee.com:tym_hmm/kafka-go.git
tym_hmm
kafka-go
kafka-go
v1.0.29

搜索帮助

53164aa7 5694891 3bd8fe86 5694891