@@ -27,6 +27,7 @@ import (
2727 "github.com/google/cel-go/common/containers"
2828 "github.com/google/cel-go/common/decls"
2929 "github.com/google/cel-go/common/env"
30+ "github.com/google/cel-go/common/functions"
3031 "github.com/google/cel-go/common/stdlib"
3132 "github.com/google/cel-go/common/types"
3233 "github.com/google/cel-go/common/types/ref"
@@ -142,6 +143,9 @@ type Env struct {
142143 validators []ASTValidator
143144 costOptions []checker.CostOption
144145
146+ funcBindOnce sync.Once
147+ functionBindings []* functions.Overload
148+
145149 // Internal parser representation
146150 prsr * parser.Parser
147151 prsrOpts []parser.Option
@@ -320,18 +324,19 @@ func NewCustomEnv(opts ...EnvOption) (*Env, error) {
320324 return nil , err
321325 }
322326 return (& Env {
323- variables : []* decls.VariableDecl {},
324- functions : map [string ]* decls.FunctionDecl {},
325- macros : []parser.Macro {},
326- Container : containers .DefaultContainer ,
327- adapter : registry ,
328- provider : registry ,
329- features : map [int ]bool {},
330- appliedFeatures : map [int ]bool {},
331- libraries : map [string ]SingletonLibrary {},
332- validators : []ASTValidator {},
333- progOpts : []ProgramOption {},
334- costOptions : []checker.CostOption {},
327+ variables : []* decls.VariableDecl {},
328+ functions : map [string ]* decls.FunctionDecl {},
329+ functionBindings : []* functions.Overload {},
330+ macros : []parser.Macro {},
331+ Container : containers .DefaultContainer ,
332+ adapter : registry ,
333+ provider : registry ,
334+ features : map [int ]bool {},
335+ appliedFeatures : map [int ]bool {},
336+ libraries : map [string ]SingletonLibrary {},
337+ validators : []ASTValidator {},
338+ progOpts : []ProgramOption {},
339+ costOptions : []checker.CostOption {},
335340 }).configure (opts )
336341}
337342
0 commit comments