MCPcopy Create free account
hub / github.com/cli/cli / commandFlagValue

Function commandFlagValue

acceptance/acceptance_test.go:152–164  ·  view source on GitHub ↗
(args []string, names ...string)

Source from the content-addressed store, hash-verified

150}
151
152func commandFlagValue(args []string, names ...string) string {
153 for i, arg := range args {
154 for _, name := range names {
155 if arg == name && i+1 < len(args) {
156 return args[i+1]
157 }
158 if value, ok := strings.CutPrefix(arg, name+"="); ok {
159 return value
160 }
161 }
162 }
163 return ""
164}
165
166func waitForWorkflow(list func() ([]string, error), expected string, sleep func(time.Duration)) error {
167 for attempt := 0; attempt < workflowPollAttempts; attempt++ {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected