feat(Go-Tool): 添加注释

This commit is contained in:
huangzj
2020-07-14 11:55:40 +08:00
parent 1c794c040c
commit 16ebb4a7e0
2 changed files with 13 additions and 1 deletions
+1
View File
@@ -40,6 +40,7 @@ func crc32Change(s string) uint32 {
return crc32.ChecksumIEEE([]byte(s))
}
//这边模的结果是从0开始到mod-1:即范围为 [0,mod)。可以做相应改进
func Crc32Mode(s string, mod int) int {
u := crc32Change(s)
return int(u) % mod