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

Function DisableIfOperator

expr.go:114–118  ·  view source on GitHub ↗

DisableIfOperator disables the `if ... else ...` operator syntax so a custom function named `if(...)` can be used without conflicts.

()

Source from the content-addressed store, hash-verified

112// DisableIfOperator disables the `if ... else ...` operator syntax so a custom
113// function named `if(...)` can be used without conflicts.
114func DisableIfOperator() Option {
115 return func(c *conf.Config) {
116 c.DisableIfOperator = true
117 }
118}
119
120// WarnOnAny tells the compiler to warn if expression return any type.
121func WarnOnAny() Option {

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…