WithOutcome adds an outcome to an existing finding. No copy is made.
(o Outcome)
| 234 | // WithOutcome adds an outcome to an existing finding. |
| 235 | // No copy is made. |
| 236 | func (f *Finding) WithOutcome(o Outcome) *Finding { |
| 237 | f.Outcome = o |
| 238 | // only bad outcomes need remediation, clear if unneeded |
| 239 | if o != f.badOutcome { |
| 240 | f.Remediation = nil |
| 241 | } |
| 242 | |
| 243 | return f |
| 244 | } |
| 245 | |
| 246 | // WithRemediationMetadata adds remediation metadata to an existing finding. |
| 247 | // No copy is made. |
no outgoing calls