// BoolVar adds a boolean flag to the parameters list. This is using the golang
// flag package internally.
324708
func BoolVar(flagVar *bool, short string, long string, value bool, usage string) *bool {
	flag.BoolVar(flagVar, short, value, usage)
	flag.BoolVar(flagVar, long, value, usage)
	addKeyDescription(short, long, value, usage)
	return flagVar
}
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
}
171790
func IsBool(v flag.Value) bool {
	if bf, ok := v.(BoolValued); ok {
		return bf.IsBoolFlag()
	}

	return false
}
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)
}
634651
func (p *Partial) Bool() (b bool, err error) {
	err = p.Unmarshal(&b)
	return
}
337256
func Bool(key string, fallback bool) bool {
	return DefaultClient.Bool(key, fallback)
}
532458
func (tr Row) BoolErr(nn int) (val bool, err error) {
	switch data := tr[nn].(type) {
	case nil:
		// nop
	case int8:
		val = (data != 0)
	case int32:
		val = (data != 0)
	case int16:
		val = (data != 0)
	case int64:
		val = (data != 0)
	case uint8:
		val = (data != 0)
	case uint32:
		val = (data != 0)
	case uint16:
		val = (data != 0)
	case uint64:
		val = (data != 0)
	case []byte:
		var v int64
		v, err = strconv.ParseInt(string(data), 0, 64)
		val = (v != 0)
	case *[]byte:
		var v int64
		v, err = strconv.ParseInt(string(*data), 0, 64)
		val = (v != 0)
	default:
		err = os.ErrInvalid
	}
	return
}
585338
func (a *Attribute) boolComparator(b *Attribute) (int, bool) {
	if *a.Bool == *b.Bool {
		return 0, true
	}

	return 1, true
}
699133
func (v *Value) Boolean() (bool, error) {
	var valid bool

	// Check the type of this data
	switch v.data.(type) {
	case bool:
		valid = true
		break
	}

	if valid {
		return v.data.(bool), nil
	}

	return false, ErrNotBool
}
1188189
func (f *Flag) Bool(name string) (bool, error) {
	v, err := f.value(name)
	if err != nil {
		return false, err
	}

	return strconv.ParseBool(v)
}
964426
func NewBoolFilter() BoolFilter {
	f := BoolFilter{
		mustClauses:    make([]Filter, 0),
		shouldClauses:  make([]Filter, 0),
		mustNotClauses: make([]Filter, 0),
	}
	return f
}
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
}
453828
func (a *Array) Bool(b bool) *Array {
	a.buf = enc.AppendBool(enc.AppendArrayDelim(a.buf), b)
	return a
}
567932
func (s *booleanCompilerVisitor) AcceptBooleanLiteral(v tree.BooleanLiteral) {
	if s.topLevel {
		s.ctx.unconditionalJumpTo(s.jt)
	} else {
		s.err = errors.New("a boolean literal was found in an expression - this is likely a programmer error")
	}
}
41085
func BoolArray(name string, values []bool) FieldOpt {
	return func(em *eventMetadata, ed *eventData) {
		em.writeArray(name, inTypeUint8, outTypeBoolean, 0)
		ed.writeUint16(uint16(len(values)))
		for _, v := range values {
			bool8 := uint8(0)
			if v {
				bool8 = uint8(1)
			}
			ed.writeUint8(bool8)
		}
	}
}
730393
func Bool() gopter.Gen {
	return func(genParams *gopter.GenParameters) *gopter.GenResult {
		return gopter.NewGenResult(genParams.NextBool(), gopter.NoShrinker)
	}
}
786444
func (t Result) Bool() bool {
	switch t.Type {
	default:
		return false
	case True:
		return true
	case String:
		return t.Str != "" && t.Str != "0" && t.Str != "false"
	case Number:
		return t.Num != 0
	}
}