1
This commit is contained in:
parent
3eeb9788ce
commit
9ab4817ec5
11
sysutils.go
11
sysutils.go
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user