How to use Decl_FunctionDecl_Overload?

82 views
Skip to first unread message

huangshuquan.12

unread,
Jan 2, 2020, 7:24:44 AM1/2/20
to CEL Go Discussion Forum
Hi,

I saw  Decl_FunctionDecl_Overload at docs. How should I use it? In my understanding, it's how to declare a function just like decls.NewFunctions. How can I define a function then?

Thanks.

Tristan Swadell

unread,
Jan 6, 2020, 12:26:24 PM1/6/20
to huangshuquan.12, CEL Go Discussion Forum
Hello,

If you're looking for a good example of how to get started with custom functions I'd look at the example that introduces a new global overload in the Go docs: https://godoc.org/github.com/google/cel-go/cel#ex-package--GlobalOverload

Under the covers, the helper functions in the example build the proto that you've found. Hopefully this helps get you started. 

Cheers,

-Tristan

--
You received this message because you are subscribed to the Google Groups "CEL Go Discussion Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cel-go-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cel-go-discuss/57275d21-4323-41f0-b3b5-d9933bcdc14f%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages