MCPcopy
hub / github.com/spf13/cobra / isFlagArg

Function isFlagArg

command.go:750–753  ·  view source on GitHub ↗
(arg string)

Source from the content-addressed store, hash-verified

748}
749
750func isFlagArg(arg string) bool {
751 return ((len(arg) >= 3 && arg[0:2] == "--") ||
752 (len(arg) >= 2 && arg[0] == '-' && arg[1] != '-'))
753}
754
755// Find the target command given the args and command tree
756// Meant to be run on the highest node. Only searches down.

Callers 2

checkIfFlagCompletionFunction · 0.85
TraverseMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected