NewWith create a finding with the desired location and outcome.
(efs embed.FS, probeID, text string, loc *Location, o Outcome, )
| 127 | |
| 128 | // NewWith create a finding with the desired location and outcome. |
| 129 | func NewWith(efs embed.FS, probeID, text string, loc *Location, |
| 130 | o Outcome, |
| 131 | ) (*Finding, error) { |
| 132 | f, err := New(efs, probeID) |
| 133 | if err != nil { |
| 134 | return nil, fmt.Errorf("finding.New: %w", err) |
| 135 | } |
| 136 | |
| 137 | f = f.WithMessage(text).WithOutcome(o).WithLocation(loc) |
| 138 | return f, nil |
| 139 | } |
| 140 | |
| 141 | // NewFalse create a false finding with the desired location. |
| 142 | func NewFalse(efs embed.FS, probeID, text string, loc *Location, |