This commit is contained in:
aozhiwei 2024-04-15 11:24:14 +08:00
parent 9ab4817ec5
commit 70d3baf515

View File

@ -9,6 +9,7 @@ import (
"os"
"reflect"
"time"
"sync"
"runtime"
"hash/crc32"
)
@ -269,6 +270,15 @@ func CalcCrc32(data string) uint32 {
return c.Sum32()
}
func GetSyncMapSize(m sync.Map) int {
var size int
m.Range(func(key, value interface{}) bool {
size++
return true
})
return size
}
func IsDebug() bool {
return true
}