MCPcopy
hub / github.com/redis/go-redis / bool

Method bool

options.go:638–650  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

636}
637
638func (o *queryOptions) bool(name string) bool {
639 switch s := o.string(name); s {
640 case "true", "1":
641 return true
642 case "false", "0", "":
643 return false
644 default:
645 if o.err == nil {
646 o.err = fmt.Errorf("redis: invalid %s boolean: expected true/false/1/0 or an empty string, got %q", name, s)
647 }
648 return false
649 }
650}
651
652func (o *queryOptions) remaining() []string {
653 if len(o.q) == 0 {

Callers 3

setupConnParamsFunction · 0.95
setupClusterQueryParamsFunction · 0.95
setupFailoverConnParamsFunction · 0.95

Calls 1

stringMethod · 0.95

Tested by

no test coverage detected