// Bool reads bool from config file, see BoolDefault
164026
func (r *Reader) Bool(name string) bool {
	return r.BoolDefault(name, false)
}
740666
func (c *Config) ReadBool(id string) (bool, error) {
	val, ok := c.Options[id]
	if !ok {
		return false, fmt.Errorf("Specified config is missing from options")
	}
	bval, err := strconv.ParseBool(val)
	if err != nil {
		return false, fmt.Errorf("Failed to parse %s as bool: %s", val, err)
	}
	return bval, nil
}
752851
func BoolT(t *testing.T, cond bool, s ...string) {
	if !cond {
		what := strings.Join(s, ", ")
		if len(what) > 0 {
			what = ": " + what
		}
		t.Fatalf("assert.Bool failed%s", what)
	}
}
1188189
func (f *Flag) Bool(name string) (bool, error) {
	v, err := f.value(name)
	if err != nil {
		return false, err
	}

	return strconv.ParseBool(v)
}
222419
func Bool(short string, long string, value bool, usage string) *bool {
	flagVar := value
	return BoolVar(&flagVar, short, long, value, usage)
}
797886
func (fs *FlagSet) Bool(names []string, value bool, usage string) *bool {
	p := new(bool)
	fs.BoolVar(p, names, value, usage)
	return p
}
56054
func (d *defaulter) AsBool(v Valuer, dv bool) bool {
	value, err := v.Value()
	if err != nil {
		d.logValuerError(err)
		return dv
	}
	bvalue, err := strconv.ParseBool(value)
	if err != nil {
		d.logFormatError("bool", err)
		return dv
	}
	return bvalue
}
625353
func (c *ConfigParser) Getbool(section, option string) (val bool, err error) {
	sv, err := c.Get(section, option)
	if err != nil {
		return val, err
	}

	val, ok := booleanStates[strings.ToLower(sv)]
	if !ok {
		return val, errors.New(fmt.Sprintf("No boolean: %s", sv))
	}

	return val, err
}
1218654
func parseBool(str string) (value bool, err error) {
	switch str {
	case "1", "t", "T", "true", "TRUE", "True", "YES", "yes", "Yes", "y", "ON", "on", "On":
		return true, nil
	case "0", "f", "F", "false", "FALSE", "False", "NO", "no", "No", "n", "OFF", "off", "Off":
		return false, nil
	}
	return false, fmt.Errorf("parsing \"%s\": invalid syntax", str)
}
634651
func (p *Partial) Bool() (b bool, err error) {
	err = p.Unmarshal(&b)
	return
}
308858
func parseBool(v string) (bool, error) {
	switch strings.ToLower(v) {
	case "true", "t", "yes", "y", "1", "":
		return true, nil
	case "false", "f", "no", "n", "0":
		return false, nil
	}
	return false, fmt.Errorf(`illegal input "%s" for bool value`, v)
}
1300537
func (c *JSONConfigContainer) Bool(key string) (bool, error) {
	val := c.getData(key)
	if val != nil {
		return ParseBool(val)
	}
	return false, fmt.Errorf("not exist key: %q", key)
}
399149
func ParseBool(s string) (bool, error) {
	v, err := boolParser.Parse(s)
	if err != nil {
		return false, err
	}
	return v.(bool), nil
}
826288
func GetBool(key string) (bool, error) {
	value, err := Get(key)
	if err != nil {
		return false, err
	}
	if v, ok := value.(bool); ok {
		return v, nil
	}
	return false, &InvalidValue{key, "boolean"}
}
441864
func (h Hash) Bool(key string) (bool, error) {
	if value, ok := h[key]; ok {
		return value.Bool()
	}
	return false, errors.New(ErrInvalidKey, errorMessages, key)
}
808503
func Bool(b bool) NullBool {
	return NullBool{
		sql.NullBool{
			Bool:  b,
			Valid: true,
		},
	}
}
696164
func (c *Distconf) Bool(key string, defaultVal bool) *Bool {
	c.grabInfo(key)
	var defautlAsInt int32
	if defaultVal {
		defautlAsInt = 1
	} else {
		defautlAsInt = 0
	}

	s := &boolConf{
		defaultVal: defautlAsInt,
		Bool: Bool{
			currentVal: defautlAsInt,
		},
	}
	// Note: in race conditions 's' may not be the thing actually returned
	ret, okCast := c.createOrGet(key, s).(*boolConf)
	if !okCast {
		c.Logger.Log(logkey.DistconfKey, key, "Registering key with multiple types!  FIX ME!!!!")
		return nil
	}
	return &ret.Bool
}