DEV Community

Discussion on: An Introduction to OPA

Collapse
 
zimmy profile image
Ron Khera

Hi,
I am using the ast.ParseModuleWithOpts() function to parse a string containing rego. the functions returns a *ast.Module. But I can not find a way to save the module to a file. I would like to do the same as the opa agent command below.
opa parse -format json some.rego
Do you have any suggestions or can ppoint me in the right direction ?
Thanks