Db file change

This commit is contained in:
刘河
2019-03-29 15:21:30 +08:00
parent cd7f99063c
commit 5fd335f330
17 changed files with 597 additions and 567 deletions

View File

@@ -15,6 +15,7 @@ import (
"regexp"
"strconv"
"strings"
"sync"
)
//Get the corresponding IP address through domain name
@@ -344,3 +345,12 @@ func BytesToNum(b []byte) int {
x, _ := strconv.Atoi(str)
return int(x)
}
func GeSynctMapLen(m sync.Map) int {
var c int
m.Range(func(key, value interface{}) bool {
c++
return true
})
return c
}