e, err := cel.NewEnv( //cel.Declarations(decls.NewIdent("event", decls.Dyn, nil)), cel.Declarations(decls.NewIdent("service", decls.String, nil)), cel.Declarations(decls.NewIdent("proto", decls.String, nil)), ) if err != nil { log.Fatalf("cel.NewEnv: %v", err) }--
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/5a5fd870-a071-4bf9-87de-0c1900fc91a0%40googlegroups.com.
"event": event,
"proto": "some string",
"service": "another string",
To view this discussion on the web visit https://groups.google.com/d/msgid/cel-go-discuss/CAEhWN%2B8VNUhPektZWALGfTHb3B1iaZea5_SEfMRYonhfy9P7ew%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to cel-go-...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to cel-go-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cel-go-discuss/5a5fd870-a071-4bf9-87de-0c1900fc91a0%40googlegroups.com.
--
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-...@googlegroups.com.
| e1 := "'event.service' == 'ssl'" e2 := "'event.mac'.contains('de')" |
| e1 := "event.service == 'ssl'" e2 := "event.mac.contains('de')" |
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/ea6fa38d-a099-414b-8025-c2e003c8537d%40googlegroups.com.
Philip,
Try removing the single quotes from around your map lookup expressions. The quotes tell CEL that it's a string, not a map lookup. I.e.
e1 := "'event.service' == 'ssl'"
e2 := "'event.mac'.contains('de')"should be
e1 := "event.service == 'ssl'"
e2 := "event.mac.contains('de')"Jim
To view this discussion on the web visit https://groups.google.com/d/msgid/cel-go-discuss/ea6fa38d-a099-414b-8025-c2e003c8537d%40googlegroups.com.
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/d535a5ae-1da5-467a-975a-3bb83647448b%40googlegroups.com.