Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OPA syntax question

Tags:

opa

I have seen in the stdlib and in some github project. Code like that :

MyClass =

  field_id(id) = "{id}_field"

{{

my_func(args) = output

}}

What the interest to have function before the {{ }} block ??

like image 516
Mattgu74 Avatar asked Mar 09 '26 14:03

Mattgu74


1 Answers

It declares the function as private to the module. Equivalent to:

MyClass = {{

  @private
  field_id(id) = "{id}_field"

  my_func(args) = output

}}
like image 97
Hugo Avatar answered Mar 11 '26 02:03

Hugo