mirror of
https://github.com/duanhf2012/origin.git
synced 2026-03-07 06:49:37 +08:00
补充日志
新增string的hash成数字
This commit is contained in:
7
util/hash/hash.go
Normal file
7
util/hash/hash.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package hash
|
||||
|
||||
import "hash/crc32"
|
||||
|
||||
func HashNumber(s string) uint {
|
||||
return uint(crc32.ChecksumIEEE([]byte(s)))
|
||||
}
|
||||
Reference in New Issue
Block a user