(ctx context.Context, checks []module.Check, rcptTo string)
| 248 | } |
| 249 | |
| 250 | func (cr *checkRunner) checkRcpt(ctx context.Context, checks []module.Check, rcptTo string) error { |
| 251 | states, err := cr.checkStates(ctx, checks) |
| 252 | if err != nil { |
| 253 | return err |
| 254 | } |
| 255 | |
| 256 | err = cr.runAndMergeResults(states, func(s module.CheckState) module.CheckResult { |
| 257 | cr.checkedRcptsLock.Lock() |
| 258 | if _, ok := cr.checkedRcptsPerCheck[s][rcptTo]; ok { |
| 259 | cr.checkedRcptsLock.Unlock() |
| 260 | return module.CheckResult{} |
| 261 | } |
| 262 | if cr.checkedRcptsPerCheck[s] == nil { |
| 263 | cr.checkedRcptsPerCheck[s] = make(map[string]struct{}) |
| 264 | } |
| 265 | cr.checkedRcptsPerCheck[s][rcptTo] = struct{}{} |
| 266 | cr.checkedRcptsLock.Unlock() |
| 267 | |
| 268 | res := s.CheckRcpt(ctx, rcptTo) |
| 269 | return res |
| 270 | }) |
| 271 | |
| 272 | cr.checkedRcpts = append(cr.checkedRcpts, rcptTo) |
| 273 | return err |
| 274 | } |
| 275 | |
| 276 | func (cr *checkRunner) checkBody(ctx context.Context, checks []module.Check, header textproto.Header, body buffer.Buffer) error { |
| 277 | states, err := cr.checkStates(ctx, checks) |
no test coverage detected