This commit is contained in:
aozhiwei 2024-04-13 12:50:58 +08:00
parent 3eeb9788ce
commit 9ab4817ec5

View File

@ -10,6 +10,7 @@ import (
"reflect" "reflect"
"time" "time"
"runtime" "runtime"
"hash/crc32"
) )
func GetDaySeconds(seconds int64, timeZone int64) int64 { func GetDaySeconds(seconds int64, timeZone int64) int64 {
@ -258,6 +259,16 @@ func GetCallStack() string {
return string(buf) return string(buf)
} }
func CalcCrc32(data string) uint32 {
tbl := crc32.MakeTable(crc32.Castagnoli)
c := crc32.New(tbl)
if _, err := c.Write([]byte(data)); err != nil {
}
return c.Sum32()
}
func IsDebug() bool { func IsDebug() bool {
return true return true
} }