MCPcopy Create free account
hub / github.com/dropbox/dbxcli / rawArgsOutputValue

Function rawArgsOutputValue

cmd/help_json.go:231–252  ·  view source on GitHub ↗
(args []string)

Source from the content-addressed store, hash-verified

229}
230
231func rawArgsOutputValue(args []string) (string, bool) {
232 value := ""
233 found := false
234 for i := 0; i < len(args); i++ {
235 arg := args[i]
236 switch {
237 case arg == "--":
238 return value, found
239 case arg == "--output":
240 if i+1 >= len(args) {
241 return value, found
242 }
243 value = args[i+1]
244 found = true
245 i++
246 case strings.HasPrefix(arg, "--output="):
247 value = strings.TrimPrefix(arg, "--output=")
248 found = true
249 }
250 }
251 return value, found
252}
253
254func rawArgsHaveHelpFlag(args []string) bool {
255 for _, arg := range args {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected