// RemoveFlag removes all instances of the specified flag from the interpreter
// command line.
505837
func (cl *CommandLine) RemoveFlag(flag CommandLineFlag) (found bool) {
	return cl.RemoveFlagMatch(func(f CommandLineFlag) bool { return f == flag })
}
568173
func (f FlagInfo) BindStringFlag(flags *pflag.FlagSet, target *string) {
	// you can't register a flag without a long name
	if len(f.LongName) > 0 {
		flags.StringVarP(target, f.LongName, f.ShortName, f.Default, f.Description)
	}
}
957571
func (cmd *CLI) SubCommandsInheritFlag(name string) {
	flag := cmd.getFlag(name)
	if cmd.propogatingFlags == nil {
		cmd.propogatingFlags = make(flagMap)
	}
	cmd.propogatingFlags[name] = flag
}
201096
func (c *unregisterCommand) SetFlags(f *gnuflag.FlagSet) {
	f.BoolVar(&c.assumeYes, "y", false, "Do not prompt for confirmation")
	f.BoolVar(&c.assumeYes, "yes", false, "")
}
654191
func Flag(name string, defv interface{}, usage string) V {
	return flagA(flagT{
		name:  name,
		defv:  defv,
		usage: usage,
	})
}
933012
func (c *Command) Flag(name string) (flag *flag.Flag) {
	flag = c.Flags().Lookup(name)

	if flag == nil {
		flag = c.persistentFlag(name)
	}

	return
}
799938
func (bf *BFlags) addFlag(name string, flagType FlagType) *Flag {
	if _, ok := bf.flags[name]; ok {
		bf.Err = fmt.Errorf("Duplicate flag defined: %s", name)
		return nil
	}

	newFlag := &Flag{
		bf:       bf,
		name:     name,
		flagType: flagType,
	}
	bf.flags[name] = newFlag

	return newFlag
}
1073621
func (c *removeStorageCommand) SetFlags(f *gnuflag.FlagSet) {
	c.StorageCommandBase.SetFlags(f)
	f.BoolVar(&c.force, "force", false, "Remove storage even if it is currently attached")
	f.BoolVar(&c.noDestroy, "no-destroy", false, "Remove the storage without destroying it")
	c.fs = f
}
296223
func (f VerifyFlag) AddFlag(fset *pflag.FlagSet) (interface{}, error) {
	switch f.Type {
	case StringFlag:
		return fset.String(f.Name, "", f.Description), nil
	case BoolFlag:
		return fset.Bool(f.Name, false, f.Description), nil
	default:
		return nil, errors.Errorf("unrecognized flag type: %v", f.Type)
	}
}
746649
func (c *killCommand) SetFlags(f *gnuflag.FlagSet) {
	c.destroyCommandBase.SetFlags(f)
	f.Var(newDurationValue(time.Minute*5, &c.timeout), "t", "Timeout before direct destruction")
	f.Var(newDurationValue(time.Minute*5, &c.timeout), "timeout", "")
}
1231652
func roleFlag(usage string, required bool) cli.Flag {
	return newPlaceholder("role, r", "ROLE", usage, "", "TORUS_ROLE", required)
}
6186
func (c *removeCommand) SetFlags(f *gnuflag.FlagSet) {
	c.ControllerCommandBase.SetFlags(f)
	f.BoolVar(&c.ConfirmDelete, "y", false, "Confirm deletion of the user")
	f.BoolVar(&c.ConfirmDelete, "yes", false, "")
}
791552
func (c *Command) ResetFlags() {
	c.flagErrorBuf = new(bytes.Buffer)
	c.flagErrorBuf.Reset()
	c.flags = flag.NewFlagSet(c.Name(), flag.ContinueOnError)
	c.flags.SetOutput(c.flagErrorBuf)
	c.pflags = flag.NewFlagSet(c.Name(), flag.ContinueOnError)
	c.pflags.SetOutput(c.flagErrorBuf)

	c.lflags = nil
	c.iflags = nil
	c.parentsPflags = nil
}
605477
func (p *propTags) RemoveTag(target string) {
	if !p.HasTag(target) {
		return
	}
	res := []string{}
	for _, tag := range p.Tags {
		if tag != target {
			res = append(res, tag)
		}
	}

	p.Tags = res
}
524736
func serviceSliceFlag(usage, value string, required bool) cli.Flag {
	return newSlicePlaceholder("service, s", "SERVICE", usage, value, "TORUS_SERVICE", required)
}
902281
func (c *PCPClient) SetFlag(flag MMVFlag) error {
	c.mutex.Lock()
	defer c.mutex.Unlock()

	if c.r.mapped {
		return errors.New("cannot set mmv flag for an active client")
	}

	c.flag = flag
	return nil
}
1229496
func ExtraFlags(extraFlags []cli.Flag) Option {
	return func(p *Plugin) error {
		for _, f := range extraFlags {
			p.App.Flags = append(p.App.Flags, f)
		}
		return nil
	}
}