MCPcopy
hub / github.com/owenthereal/ccat / Flags

Method Flags

Godeps/_workspace/src/github.com/spf13/cobra/command.go:862–872  ·  view source on GitHub ↗

Get the complete FlagSet that applies to this command (local and persistent declared here and by all parents)

()

Source from the content-addressed store, hash-verified

860
861// Get the complete FlagSet that applies to this command (local and persistent declared here and by all parents)
862func (c *Command) Flags() *flag.FlagSet {
863 if c.flags == nil {
864 c.flags = flag.NewFlagSet(c.Name(), flag.ContinueOnError)
865 if c.flagErrorBuf == nil {
866 c.flagErrorBuf = new(bytes.Buffer)
867 }
868 c.flags.SetOutput(c.flagErrorBuf)
869 c.PersistentFlags().BoolVarP(&c.helpFlagVal, "help", "h", false, "help for "+c.Name())
870 }
871 return c.flags
872}
873
874// Get the local FlagSet specifically set in the current command
875func (c *Command) LocalFlags() *flag.FlagSet {

Callers 12

MarkFlagRequiredMethod · 0.95
TestStripFlagsFunction · 0.95
executeMethod · 0.95
HasFlagsMethod · 0.95
FlagMethod · 0.95
ParseFlagsMethod · 0.95
mergePersistentFlagsMethod · 0.95
TestBashCompletionsFunction · 0.80
flagInitFunction · 0.80
initializeWithRootCmdFunction · 0.80
stripFlagsFunction · 0.80

Calls 4

NameMethod · 0.95
PersistentFlagsMethod · 0.95
BoolVarPMethod · 0.80
SetOutputMethod · 0.45

Tested by 4

TestStripFlagsFunction · 0.76
TestBashCompletionsFunction · 0.64
flagInitFunction · 0.64
initializeWithRootCmdFunction · 0.64