MCPcopy Index your code
hub / github.com/docker/cli / appendNextSteps

Function appendNextSteps

cli-plugins/manager/hooks.go:135–149  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
135func 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)

Callers 2

TestAppendNextStepsFunction · 0.85
invokeAndCollectHooksFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestAppendNextStepsFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…