// Flag returns true if set.
490445
func (a Attributes) Flag(flag string) bool {
	for _, v := range a {
		if v.Key == flag {
			return true
		}
	}
	return false
}
1338294
func Flag(fs *flag.FlagSet) {
	for _, id := range All {
		desc := id.Flag()
		key := fmt.Sprintf("X%s", id.Flag())
		fs.Var(&idValue{X: id}, key, desc)
	}
}
963563
func (f *flagGroup) Flag(name, help string) *FlagClause {
	flag := newFlag(name, help)
	f.long[name] = flag
	f.flagOrder = append(f.flagOrder, flag)
	return flag
}
806983
func (*GoFlags) Bool(o string, d bool, c string) *bool {
	return flag.Bool(o, d, c)
}
141154
func (f *BoolTFlag) Apply(set *flag.FlagSet) {
	f.set = set
	f.BoolTFlag.Apply(set)
}
1219779
func SetFlags(flags int) {
	defaultWriter.mutex.Lock()
	log.SetFlags(flags)
	defaultWriter.flags = flags
	defaultWriter.mutex.Unlock()
}
886480
func (cmd *CLI) Flag(name string) values.Value {
	flag := cmd.getFlag(name)
	value := cmd.flagValues[flag]
	return value
}
346391
func (s *myFlag) Set(arg string) error {
	trace.Println("setting flag", s.field.Name)
	err := assignType(s.fieldValue, arg)
	if err != nil {
		return err
	}
	return nil
}
692289
func (f Flag) String() string {
	switch f {
	case ExitSettle:
		return "ExitSettle"
	case AddIncoming:
		return "AddIncoming"
	case SettleIncoming:
		return "SettleIncoming"
	case FailIncoming:
		return "FailIncoming"
	case AddOutgoing:
		return "AddOutgoing"
	case SettleOutgoing:
		return "SettleOutgoing"
	case FailOutgoing:
		return "FailOutgoing"
	case Commit:
		return "Commit"
	case BogusSettle:
		return "BogusSettle"
	default:
		return "UnknownHodlFlag"
	}
}
387511
func checkFlags(c *cli.Context, flags ...string) error {
	for _, flag := range flags {
		if c.String(flag) == "" {
			cli.ShowSubcommandHelp(c)
			err := errors.Errorf("error: the required flag %q was empty or not provided", flag)
			fmt.Fprintln(os.Stderr, err)
			return err
		}
	}

	return nil
}
765962
func NewFlag() *Flag {
	f := &Flag{
		args:     os.Args,
		defaults: defaultsPrinter,
	}

	return 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)
	}
}
140017
func Flags(f byte) Field {
	return func(p *Packet) error {
		return p.append(flags, []byte{f})
	}
}
38649
func (txn *Txn) Flags(dbi DBI) (uint, error) {
	var cflags C.uint
	ret := C.mdb_dbi_flags(txn._txn, C.MDB_dbi(dbi), (*C.uint)(&cflags))
	return uint(cflags), operrno("mdb_dbi_flags", ret)
}
621462
func (f RegexpFilter) Flags(flags string) RegexpFilter {
	f.flags = &flags
	return f
}
4210
func (f Flag) Int(name string) (int, error) {
	v, err := f.value(name)
	if err != nil {
		return 0, err
	}

	i, err := strconv.Atoi(v)
	if err != nil {
		return 0, err
	}

	return i, nil
}
121386
func (cmd *CLI) setFlag(flag *Flag, value string) error {
	_ = cmd.flags[flag.Name] // Verify the flag is a flag for f set
	err := flag.value.Set(value)
	if err != nil {
		return err
	}
	cmd.flagValues[flag] = flag.value
	return nil
}