MCPcopy Create free account
hub / github.com/Facets-cloud/flow / extractWorkdirBoolFlag

Function extractWorkdirBoolFlag

internal/app/workdir.go:206–217  ·  view source on GitHub ↗

extractWorkdirBoolFlag removes a bare boolean flag anywhere in args and returns (found, remaining). Named specifically to avoid collisions with parallel-agent helpers.

(args []string, flagName string)

Source from the content-addressed store, hash-verified

204// returns (found, remaining). Named specifically to avoid collisions with
205// parallel-agent helpers.
206func extractWorkdirBoolFlag(args []string, flagName string) (bool, []string) {
207 out := make([]string, 0, len(args))
208 found := false
209 for _, a := range args {
210 if a == flagName {
211 found = true
212 continue
213 }
214 out = append(out, a)
215 }
216 return found, out
217}
218
219// extractWorkdirStringFlag pulls a `--flag val` or `--flag=val` pair out of
220// args, returning (value, remaining, error). Returns ("", args, nil) if

Callers 1

cmdWorkdirScanFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected