appendNextSteps appends the processed hook output to the nextSteps slice. If the processed hook output is empty, it is not appended. Empty lines are not stripped if there's at least one non-empty line.
(nextSteps []string, processed []string)
| 133 | // If the processed hook output is empty, it is not appended. |
| 134 | // Empty lines are not stripped if there's at least one non-empty line. |
| 135 | func appendNextSteps(nextSteps []string, processed []string) ([]string, bool) { |
| 136 | empty := true |
| 137 | for _, l := range processed { |
| 138 | if strings.TrimSpace(l) != "" { |
| 139 | empty = false |
| 140 | break |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | if empty { |
| 145 | return nextSteps, false |
| 146 | } |
| 147 | |
| 148 | return append(nextSteps, processed...), true |
| 149 | } |
| 150 | |
| 151 | // pluginMatch takes a plugin configuration and a string representing the |
| 152 | // command being executed (such as 'image ls' – the root 'docker' is omitted) |
no outgoing calls
searching dependent graphs…