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

Function ConstExpr

expr.go:59–63  ·  view source on GitHub ↗

ConstExpr defines func expression as constant. If all argument to this function is constants, then it can be replaced by result of this func call on compile step.

(fn string)

Source from the content-addressed store, hash-verified

57// ConstExpr defines func expression as constant. If all argument to this function is constants,
58// then it can be replaced by result of this func call on compile step.
59func ConstExpr(fn string) Option {
60 return func(c *conf.Config) {
61 c.ConstExpr(fn)
62 }
63}
64
65// AsAny tells the compiler to expect any result.
66func AsAny() Option {

Callers 7

Benchmark_callConstExprFunction · 0.92
ExampleConstExprFunction · 0.92
BenchmarkCheckerFunction · 0.92

Calls 1

ConstExprMethod · 0.80

Tested by 7

Benchmark_callConstExprFunction · 0.74
ExampleConstExprFunction · 0.74
BenchmarkCheckerFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…