findDiff returns the first diff matching a predicate, or a zero value.
(diffs []IntentRuntimeDiff, pred func(IntentRuntimeDiff) bool)
| 6 | |
| 7 | // findDiff returns the first diff matching a predicate, or a zero value. |
| 8 | func findDiff(diffs []IntentRuntimeDiff, pred func(IntentRuntimeDiff) bool) (IntentRuntimeDiff, bool) { |
| 9 | for _, d := range diffs { |
| 10 | if pred(d) { |
| 11 | return d, true |
| 12 | } |
| 13 | } |
| 14 | return IntentRuntimeDiff{}, false |
| 15 | } |
| 16 | |
| 17 | // TestDiffDeclaredVsEffectMismatch: an install tool call that reads a foreign |
| 18 | // secret violates its contract (install does not permit secret_read). |
no outgoing calls
no test coverage detected