func (c *SuperCommand) SetCommonFlags(f *gnuflag.FlagSet) {
	if c.Log != nil {
		c.Log.AddFlags(f)
	}
	if c.globalFlags != nil {
		c.globalFlags.AddFlags(f)
	}
	f.BoolVar(&c.showHelp, "h", false, helpPurpose)
	f.BoolVar(&c.showHelp, "help", false, "")
	// In the case where we are providing the basis for a plugin,
	// plugins are required to support the --description argument.
	// The Purpose attribute will be printed (if defined), allowing
	// plugins to provide a sensible line of text for 'juju help plugins'.
	f.BoolVar(&c.showDescription, "description", false, "Show short description of plugin, if any")
	c.commonflags = gnuflag.NewFlagSetWithFlagKnownAs(c.Info().Name, gnuflag.ContinueOnError, FlagAlias(c, "flag"))
	c.commonflags.SetOutput(ioutil.Discard)
	f.VisitAll(func(flag *gnuflag.Flag) {
		c.commonflags.Var(flag.Value, flag.Name, flag.Usage)
	})
}
// SetCommonFlags creates a new "commonflags" flagset, whose
// flags are shared with the argument f; this enables us to
// add non-global flags to f, which do not carry into subcommands.
SetCommonFlags creates a new "commonflags" flagset, whose
flags are shared with the argument f; this enables us to
add non-global flags to f, which do not carry into subcommands.
// SetCommonFlags creates a new " commonflags " flagset whose // flags are shared with the argument f ; this enables us to // add non - global flags to f which do not carry into subcommands .
func (c *SuperCommand) SetCommonFlags(f *gnuflag.FlagSet) {
	if c.Log != nil {
		c.Log.AddFlags(f)
	}
	if c.globalFlags != nil {
		c.globalFlags.AddFlags(f)
	}
	f.BoolVar(&c.showHelp, "h", false, helpPurpose)
	f.BoolVar(&c.showHelp, "help", false, "")
	f.BoolVar(&c.showDescription, "description", false, "Show short description of plugin, if any")
	c.commonflags = gnuflag.NewFlagSetWithFlagKnownAs(c.Info().Name, gnuflag.ContinueOnError, FlagAlias(c, "flag"))
	c.commonflags.SetOutput(ioutil.Discard)
	f.VisitAll(func(flag *gnuflag.Flag) {
		c.commonflags.Var(flag.Value, flag.Name, flag.Usage)
	})
}
func ( c * SuperCommand ) SetCommonFlags ( f * gnuflag . FlagSet ) { if c . Log != nil { c . Log . AddFlags ( f ) } if c . globalFlags != nil { c . globalFlags . AddFlags ( f ) } f . BoolVar ( & c . showHelp , " " , false , helpPurpose ) f . BoolVar ( & c . showHelp , " " , false , " " ) f . BoolVar ( & c . showDescription , " " , false , " " ) c . commonflags = gnuflag . NewFlagSetWithFlagKnownAs ( c . Info ( ) . Name , gnuflag . ContinueOnError , FlagAlias ( c , " " ) ) c . commonflags . SetOutput ( ioutil . Discard ) f . VisitAll ( func ( flag * gnuflag . Flag ) { c . commonflags . Var ( flag . Value , flag . Name , flag . Usage ) } ) }
SetCommonFlags creates a new "commonflags" flagset, whose
flags are shared with the argument f; this enables us to
add non-global flags to f, which do not carry into subcommands.
SetCommonFlags creates a new " commonflags " flagset whose flags are shared with the argument f ; this enables us to add non - global flags to f which do not carry into subcommands .
// In the case where we are providing the basis for a plugin, // plugins are required to support the --description argument. // The Purpose attribute will be printed (if defined), allowing // plugins to provide a sensible line of text for 'juju help plugins'.