1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-16 11:37:36 +02:00

+ Remove function (#163)

This commit is contained in:
Max 2018-11-06 23:17:48 +08:00 committed by Tim Voronov
parent 40728f7ef9
commit ad9bfbd4ad

View File

@ -44,6 +44,10 @@ func (c *FqlCompiler) RegisterFunction(name string, fun core.Function) error {
return nil
}
func (c *FqlCompiler) RemoveFunction(name string) {
delete(c.funcs, strings.ToUpper(name))
}
func (c *FqlCompiler) RegisterFunctions(funcs map[string]core.Function) error {
for name, fun := range funcs {
if err := c.RegisterFunction(name, fun); err != nil {