ContainsOutputFormat checks if the specified output format is in the output formats list. It handles formats that may include file paths (e.g., "attestation=/path/to/file").
(outputFormats []string, format string)
| 94 | // ContainsOutputFormat checks if the specified output format is in the output formats list. |
| 95 | // It handles formats that may include file paths (e.g., "attestation=/path/to/file"). |
| 96 | func ContainsOutputFormat(outputFormats []string, format string) bool { |
| 97 | for _, item := range outputFormats { |
| 98 | parts := strings.Split(item, "=") |
| 99 | if parts[0] == format { |
| 100 | return true |
| 101 | } |
| 102 | } |
| 103 | return false |
| 104 | } |
| 105 | |
| 106 | // CollectComponentResults processes a slice of results, accumulating errors and collecting successful components. |
| 107 | // It returns the collected components (sorted by ContainerImage), policy inputs, and any aggregated errors. |
no outgoing calls