1 Star 3 Fork 3

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
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/tym_hmm/kafka-go.git
git@gitee.com:tym_hmm/kafka-go.git
tym_hmm
kafka-go
kafka-go
master

搜索帮助