Skip to content

how to disable the builtin function "if" #808

Description

@emicklei

hi,

I am using expr for creating a DSL to program music melodies (melrōse.org) .

The version (v1.17.5) has support for the operator if else but this conflicts with my custom "if" function.

For earlier releases, I was able to disable functions:

for _, each := range []string{"join", "repeat", "trim", "replace", "duration", "map"} {
	options = append(options, expr.DisableBuiltin(each))
}

However, this does not work for the "if" operator. Please advice how to accomplish this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions