Hey,
when we pass options to use Module
we usually do that via a list. Most of the time the options are simple and don’t require any nesting.
In my case, I need nested options. What is the best way to accept them?
My first guess is simply a nested list. Something like:
use Module,
scope_1: [opt_1: :value, opt_2: :value],
scope_2: [opt_1: :value, opt_2: :value]
Is that fine or should I use something else? From a usage point of view, this is already quite comfortable since I can just use Keyword.get
and define default values.