This commit is contained in:
wangchuxiao
2023-02-15 15:52:32 +08:00
parent 85ebf24325
commit 6619183a48
62 changed files with 1319 additions and 2491 deletions
+5
View File
@@ -7,6 +7,7 @@ import (
"github.com/golang/protobuf/proto"
"github.com/jinzhu/copier"
"github.com/pkg/errors"
"hash/crc32"
"math/rand"
"reflect"
"runtime"
@@ -226,3 +227,7 @@ func ProtoToMap(pb proto.Message, idFix bool) map[string]interface{} {
}
return out
}
func GetHashCode(s string) uint32 {
return crc32.ChecksumIEEE([]byte(s))
}