// BoolVar defines a bool flag with specified name, default value, and usage string.
// The argument p points to a bool variable in which to store the value of the flag.
559417
func (fs *FlagSet) BoolVar(p *bool, names []string, value bool, usage string) {
	fs.Var(newBoolValue(value, p), names, usage)
}
1244595
func (p *Prompt) Bool(q string, def bool) (bool, error) {
	w := &w{}
	w.print(p.output, colors.Default, q)
	str := "Y"
	if !def {
		str = "N"
	}
	w.print(p.output, p.defaultColor, "（", str, "）")
	w.print(p.output, colors.Default, "：")

	val := w.read(p)
	if w.err != nil {
		return false, w.err
	}

	switch strings.ToLower(val) {
	case "yes", "y":
		return true, nil
	case "no", "n":
		return false, nil
	default:
		return def, nil
	}
}
585338
func (a *Attribute) boolComparator(b *Attribute) (int, bool) {
	if *a.Bool == *b.Bool {
		return 0, true
	}

	return 1, true
}
67884
func Bool(v bool) *bool {
	p := new(bool)
	*p = v
	return p
}
740337
func (*GoFlags) BoolVar(b *bool, o string, d bool, c string) {
	flag.BoolVar(b, o, d, c)
}
368910
func (f *Queries) Bool(key string) (bool, error) {
	s, err := f.String(key)
	if err != nil {
		return false, err
	}
	return strconv.ParseBool(s)
}
864525
func setBoolVal(field bool, ctx runtimeFlagsContext, flagName string, inverse ...bool) bool {
	// check to see if a value was set (either on the command-line or via the associated
	// environment variable, if any); if so, use that as value for the input field
	val := ctx.Bool(flagName)
	if ctx.IsSet(flagName) || val {
		field = val
		if len(inverse) > 0 {
			field = !field
		}
	}
	return field
}
621753
func (l *Literal) Bool() (bool, error) {
	if l.t != Bool {
		return false, fmt.Errorf("literal.Bool: literal is of type %v; cannot be converted to a bool", l.t)
	}
	return l.v.(bool), nil
}
854675
func (self *Config) Bool(section string, option string) (value bool, err error) {
	sv, err := self.String(section, option)
	if err != nil {
		return false, err
	}

	value, ok := boolString[strings.ToLower(sv)]
	if !ok {
		return false, errors.New("could not parse bool value: " + sv)
	}

	return value, nil
}
1249114
func (f *FlagClause) Bool() (target *bool) {
	target = new(bool)
	f.SetValue(newBoolValue(target))
	return
}
1182759
func NewBoolPtr(val bool) *bool {
	ptrValue := new(bool)
	*ptrValue = val
	return ptrValue
}
1080624
func (b *BoolValue) String() string {
	var current bool
	if b.v != nil {
		current = *(b.v)
	}
	return fmt.Sprintf("%v", current)
}
1353216
func SwitchVar(flagVar *bool, short string, long string, usage string) *bool {
	return BoolVar(flagVar, short, long, false, usage)
}
65654
func (b Bool) Bool() bool {
	if b.Initialized {
		return b.Val
	}
	return b.Default
}
673226
func (h *HCL) Bool(name string) (bool, error) {
	v, err := h.value(name)
	if err != nil {
		return false, err
	}

	return v.(bool), nil
}
408147
func (tr Row) Bool(nn int) (val bool) {
	val, err := tr.BoolErr(nn)
	if err != nil {
		panic(err)
	}
	return
}
1077932
func (j *JsonQuery) Bool(s ...string) (bool, error) {
	val, err := rquery(j.blob, s...)
	if err != nil {
		return false, err
	}
	return boolFromInterface(val)
}