MCPcopy
hub / github.com/expr-lang/expr / AsBool

Function AsBool

expr.go:81–86  ·  view source on GitHub ↗

AsBool tells the compiler to expect a boolean result.

()

Source from the content-addressed store, hash-verified

79
80// AsBool tells the compiler to expect a boolean result.
81func AsBool() Option {
82 return func(c *conf.Config) {
83 c.Expect = reflect.Bool
84 c.ExpectAny = true
85 }
86}
87
88// AsInt tells the compiler to expect an int result.
89func AsInt() Option {

Callers 10

ExampleAsBoolFunction · 0.92
ExampleAsBool_errorFunction · 0.92
TestAsBool_exposed_errorFunction · 0.92
TestCompile_ExpectFunction · 0.92
TestCheckFunction · 0.92
TestCheck_AsBoolFunction · 0.92
TestIssue830Function · 0.92
TestIssue461Function · 0.92

Calls

no outgoing calls

Tested by 10

ExampleAsBoolFunction · 0.74
ExampleAsBool_errorFunction · 0.74
TestAsBool_exposed_errorFunction · 0.74
TestCompile_ExpectFunction · 0.74
TestCheckFunction · 0.74
TestCheck_AsBoolFunction · 0.74
TestIssue830Function · 0.74
TestIssue461Function · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…