Replies: 1 comment 1 reply
-
If you a creating a ruleset(multiple rules) i think the right way to do it is just pass in an array So basically like this
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello there,
I'm currently trying to create a ruleset from a single json file with multiple rules, but I couldn't find how to properly do it.
From what I can tell from the docs, the json file should be like this:
But what if I have multiple rules for this file? Is there a top level definition, like:
Thanks in advance and sorry if it's a stupid question.
Update: --------------------------------------------
I found a possible workaround, where I create a struct of the following type:
I unmarshal my
rules.json
into this struct, then I marshal it again using only the rules, like this:This worked, but not sure if it's the right way to do it.
Beta Was this translation helpful? Give feedback.
All reactions