2

I have a simple rego file like this:

package example

default isApplicable := false

isApplicable if {
   timeNow := time.now_ns()
   timeNow >= input.startDatetime
}

and I keep getting parse error:

"rego_parse_error: var cannot be used for rule name"

rsc
  • 10,348
  • 5
  • 39
  • 36

1 Answers1

3

I found out that I had to have import future.keywords.if in my rego. After adding it the error is gone.

rsc
  • 10,348
  • 5
  • 39
  • 36