def validate(options, schema) do
case validate_options_with_schema_and_path(schema, options_schema()) do
and this one:
defp validate_options_with_schema(opts, fun, path) when is_function(fun) do
validate_options_with_schema(opts, fun.(), path)
it confused me a bit, on the first validate_options_with_schema_and_path/2 I don't see the path as an argument, in the second block of code, I see that the path is needed but the function name is validate_options_with_schema. So, my best guess is that we should switch the function names and that's what I did here.
The first time that I read this code:
and this one:
it confused me a bit, on the first
validate_options_with_schema_and_path/2
I don't see the path as an argument, in the second block of code, I see that the path is needed but the function name isvalidate_options_with_schema
. So, my best guess is that we should switch the function names and that's what I did here.