Rename tool to util.

This commit is contained in:
zicla
2019-04-26 03:01:40 +08:00
parent ce84a9c9f0
commit aed1ee2001
28 changed files with 104 additions and 104 deletions

4
code/cache/cache.go vendored
View File

@ -5,7 +5,7 @@ import (
"fmt"
"sort"
"sync"
"tank/code/tool"
"tank/code/util"
"time"
)
@ -197,7 +197,7 @@ func (table *CacheTable) checkExpire() {
table.cleanupInterval = smallestDuration
if smallestDuration > 0 {
table.cleanupTimer = time.AfterFunc(smallestDuration, func() {
go tool.SafeMethod(table.checkExpire)
go util.SafeMethod(table.checkExpire)
})
}
table.Unlock()