// SetBOOL sets the BOOL field's value.
434070
func (s *AttributeValue) SetBOOL(v bool) *AttributeValue {
	s.BOOL = &v
	return s
}
1063600
func Bool(value interface{}) bool {
	b, _ := strconv.ParseBool(String(value))
	return b
}
478442
func (c *Context) GetBool(key string) (b bool) {
	if val, ok := c.Get(key); ok && val != nil {
		b, _ = val.(bool)
	}
	return
}
122815
func ParseBool(s string) bool {
	b, err := strconv.ParseBool(s)
	if err != nil {
		return false
	}

	return b
}
584140
func (v *value) AsBool(dv bool) bool {
	if v.IsUndefined() {
		return dv
	}
	switch tv := v.raw.(type) {
	case string:
		b, err := strconv.ParseBool(tv)
		if err != nil {
			return dv
		}
		return b
	case int:
		return tv == 1
	case float64:
		return tv == 1.0
	case bool:
		return tv
	}
	return dv
}
907269
func (me *Event) SetBool(b bool) {
	if b {
		me.Set()
	} else {
		me.Clear()
	}
}
273904
func (s Slice) GetBool() (bool, error) {
	if err := s.AssertType(Bool); err != nil {
		return false, WithStack(err)
	}
	return s.IsTrue(), nil
}
601153
func (dec *Decoder) Bool(v *bool) error {
	err := dec.decodeBool(v)
	if err != nil {
		return err
	}
	dec.called |= 1
	return nil
}
1064361
func NewBool(vals ...V) BoolA {
	a := &arg{}

	d := Default.Get(vals)
	a.defv = d

	f := A(flagA).Get(vals)
	if f != nil {
		f := f.(flagT)
		a.defv = flag.Bool(f.name, f.defv.(bool), f.usage)
	}

	ab := a.getA()
	return func(b bool) V {
		return ab(b)
	}
}
1137547
func (c *SQLiteContext) ResultBool(b bool) {
	if b {
		c.ResultInt(1)
	} else {
		c.ResultInt(0)
	}
}
343329
func (o *IntOptions) SetBool(key string, value bool) {
	intValue := OptionDisabled
	if value {
		intValue = OptionEnabled
	}
	o.optsMU.Lock()
	o.Opts[key] = intValue
	o.optsMU.Unlock()
}
267811
func (enc *Encoder) encodeBool(v bool) ([]byte, error) {
	enc.grow(5)
	if v {
		enc.writeString("true")
	} else {
		enc.writeString("false")
	}
	return enc.buf, enc.err
}
814317
func (node *Node) GetBool(key string) bool {
	b, _ := strconv.ParseBool(node.Values.Get(key))
	return b
}
1119448
func (b *Builder) addBool(v bool) {
	if v {
		b.addTrue()
	} else {
		b.addFalse()
	}
}
545366
func (c ConfigAttributes) GetBool(attrName string, defaultValue bool) bool {
	if val, ok := c[attrName]; ok {
		return val.(bool)
	}
	return defaultValue
}
376046
func AnyBool(c *cli.Context, key string) bool {
	return c.Bool(key) || c.GlobalBool(key)
}
114414
func (r *Reader) ReadBool() (bool, error) {
	if r.Err != nil {
		return false, r.Err
	}

	if b, err := r.ReadBits(bitsPerBool); err != nil {
		r.Err = errors.WithMessage(err, "read bool")
		return false, r.Err
	} else {
		return 1 == b, nil
	}
}