no lock inside, so the caller must lock the verificationMap before calling!
()
| 62 | |
| 63 | // no lock inside, so the caller must lock the verificationMap before calling! |
| 64 | func removeExpiredPairs() { |
| 65 | now := time.Now() |
| 66 | for key := range verificationMap { |
| 67 | if int(now.Sub(verificationMap[key].time).Seconds()) >= VerificationValidMinutes*60 { |
| 68 | delete(verificationMap, key) |
| 69 | } |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | func init() { |
| 74 | verificationMutex.Lock() |
no outgoing calls
no test coverage detected