We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When returning a map in a step like this.
result = step.run(ctx, "step", fn -> %{foo: "bar"} end)
The result is set to %{ "foo" => "bar" } instead of %{foo: "bar"} which is what you'd expect from the code.
result
%{ "foo" => "bar" }
%{foo: "bar"}
This will raise an error if you try to pattern match against the returned value when doing
%{foo: _} = step.run(ctx, "step", fn -> %{foo: "bar"} end)
The text was updated successfully, but these errors were encountered:
Provided an options and make it step.run/3 so user can specify the map structure they expect.
step.run/3
Also provide a configurable library default option, with the steps being the final override.
Discussion: https://elixirforum.com/t/pattern-match-on-map-keys-that-can-be-atoms-or-strings/63760/7
Sorry, something went wrong.
No branches or pull requests
Overview
When returning a map in a step like this.
The
result
is set to%{ "foo" => "bar" }
instead of%{foo: "bar"}
which is what you'd expect from the code.This will raise an error if you try to pattern match against the returned value when doing
The text was updated successfully, but these errors were encountered: