// PopBool pops bool from session
183142
func (s *Session) PopBool(key string) bool {
	r, _ := s.Pop(key).(bool)
	return r
}
1282585
func cBBool(x bool) C.CK_BBOOL {
	if x {
		return C.CK_BBOOL(C.CK_TRUE)
	}
	return C.CK_BBOOL(C.CK_FALSE)
}
629623
func (c *client) Bool(key string, fallback bool) bool {
	if b, err := strconv.ParseBool(c.Getenv(key)); err == nil {
		return b
	}

	return fallback
}
488144
func ParseBool(value string) (bool, error) {
	switch strings.ToLower(value) {
	case "yes", "yeah", "y", "true", "1", "on":
		return true, nil
	case "no", "nope", "n", "false", "0", "off":
		return false, nil
	default:
		return false, trace.BadParameter("unsupported value: %q", value)
	}
}
644037
func NewBool(into *bool, v bool) *BoolValue {
	*into = v
	return (*BoolValue)(into)
}
808503
func Bool(b bool) NullBool {
	return NullBool{
		sql.NullBool{
			Bool:  b,
			Valid: true,
		},
	}
}
910329
func (enc *Encoder) SliceBool(s []bool) {
	enc.Array(EncodeArrayFunc(func(enc *Encoder) {
		for _, i := range s {
			enc.Bool(i)
		}
	}))
}
1016818
func (tr Row) ForceBool(nn int) (val bool) {
	val, _ = tr.BoolErr(nn)
	return
}
693968
func (m AttributeMap) PopBool(name string) (bool, error) {
	var b bool
	_, err := m.Pop(name, &b)
	return b, err
}
877281
func (d Data) GetBool(key string) bool {
	if !d.KeyExists(key) || len(d.Values[key]) == 0 {
		return false
	}
	str := d.Get(key)
	if result, err := strconv.ParseBool(str); err != nil {
		panic(err)
	} else {
		return result
	}
}
1239556
func (s *stack) PeekBool(idx int32) (bool, error) {
	so, err := s.PeekByteArray(idx)
	if err != nil {
		return false, err
	}

	return asBool(so), nil
}
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
}
1081167
func NewBool(val bool, p *bool) *Bool {
	*p = val
	return (*Bool)(p)
}
1247583
func GetBool(key string, defaultValue bool) bool {
	b, err := factory.GetValue(key).ToBool()
	if err != nil {
		return defaultValue
	}
	return b
}
1302036
func ParseBool(value string, defaultValue bool) (bool, error) {
	value = strings.ToLower(strings.Trim(value, " "))
	if value == "" {
		return defaultValue, nil
	}

	return strconv.ParseBool(value)
}
1070790
func (context *BaseContext) SetBool(key string, value bool) {
	context.userData[key] = value
}
478442
func (c *Context) GetBool(key string) (b bool) {
	if val, ok := c.Get(key); ok && val != nil {
		b, _ = val.(bool)
	}
	return
}