// Bool renders the bool identifier.
195148
func (g *Group) Bool() *Statement {
	s := Bool()
	g.items = append(g.items, s)
	return s
}
360070
func Bool(in string) bool {
	if b, err := strconv.ParseBool(in); err == nil {
		return b
	}
	return false
}
1249114
func (f *FlagClause) Bool() (target *bool) {
	target = new(bool)
	f.SetValue(newBoolValue(target))
	return
}
518039
func (kv KeyValue) bool(name string, defaultValue bool) bool {
	if v, found := kv[name]; found {
		if castValue, is := v.(bool); is {
			return castValue
		}
	}
	return defaultValue
}
516443
func TryToBool(i interface{}) (b bool, err error) {
	switch v := i.(type) {
	case nil:
	case bool:
		b = v
	case *bool:
		b = *v
	case string:
		b, err = strconv.ParseBool(v)
	case *string:
		b, err = strconv.ParseBool(*v)
	case int, int8, int16, int32, int64:
		b = v != 0
	default:
		err = castError(i, "bool")
	}
	return
}
47282
func (v Value) GetBool() (bool, error) {
	var err error

	if v.t != reflect.Bool {
		err = fmt.Errorf("not a bool Value")
	}

	return v.b, err
}
596186
func (t *BoolFlag) Bool() bool {
	if t.viper == nil {
		panic(ErrFlagNotYetBind1.New(nil, t.Name))
	}
	return t.viper.GetBool(t.Name)
}
248609
func Bool(key string, def bool) bool {
	val := os.Getenv(key)
	if val == "" {
		return def
	}

	b, err := strconv.ParseBool(val)
	if err != nil {
		return def
	}
	return b
}
1137547
func (c *SQLiteContext) ResultBool(b bool) {
	if b {
		c.ResultInt(1)
	} else {
		c.ResultInt(0)
	}
}
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
}
1132196
func (c Context) Bools(key string, b []bool) Context {
	c.l.context = enc.AppendBools(enc.AppendKey(c.l.context, key), b)
	return c
}
898647
func (b *Bool) BoolOr(or bool) bool {
	if b == nil {
		return or
	}
	if !b.Valid {
		return or
	}

	return b.Bool
}
569570
func (enc *Encoder) Bool(v bool) {
	enc.grow(5)
	r := enc.getPreviousRune()
	if r != '[' {
		enc.writeByte(',')
	}
	if v {
		enc.writeString("true")
	} else {
		enc.writeString("false")
	}
}
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)
}
154069
func (c *Context) BoolT(name string) bool {
	return lookupBoolT(name, c.flagSet)
}
834884
func _boolf(i interface{}) (bool, bool) {

	if i2, ok := i.(*Graph); ok {
		// i2 can still be nil (of type *Graph!)
		if i2 == nil {
			return false, false
		}
		i = i2.This
	}

	switch v := i.(type) {
	case []byte:
		s := string(v)

		if falseStr == s {
			return false, true
		}
		if trueStr == s {
			return true, true
		}
		return false, false
	case string:
		if falseStr == v {
			return false, true
		}
		if trueStr == v {
			return true, true
		}
		return false, false
	case bool:
		return v, true
	}

	return false, false
}
598913
func (b *QueryBuilder) Bool() *BoolQueryBuilder {
	if b.boolQueryBuilder == nil {
		b.boolQueryBuilder = NewBoolQueryBuilder()
	}
	return b.boolQueryBuilder
}