()
| 212 | } |
| 213 | |
| 214 | func (pool *CheckPool) Handler() { |
| 215 | defer close(pool.handlerDone) |
| 216 | for bl := range pool.processCh { |
| 217 | if bl.IsValid { |
| 218 | params := map[string]interface{}{ |
| 219 | "current": bl, |
| 220 | } |
| 221 | if pool.MatchExpr != nil && pkg.CompareWithExpr(pool.MatchExpr, params) { |
| 222 | bl.IsValid = true |
| 223 | } |
| 224 | } |
| 225 | if bl.Source == parsers.CheckSource { |
| 226 | pool.Bar.Done() |
| 227 | } |
| 228 | pool.recordCheckStat(bl) |
| 229 | pool.putToOutput(bl) |
| 230 | pool.wg.Done() |
| 231 | } |
| 232 | } |
| 233 | |
| 234 | func (pool *CheckPool) recordCheckStat(bl *baseline.Baseline) { |
| 235 | if pool.Statistor == nil || bl == nil || bl.SprayResult == nil { |
no test coverage detected