Why Nostr? What is Njump?
2025-04-01 13:09:44

Tyler A. Young 🧑🏻‍💻⚗️ on Nostr: Okay #ElixirLang folks, I need your ideas... I'd like to override the fallback ...

Okay #ElixirLang folks, I need your ideas...

I'd like to override the fallback Inspect protocol for all structs to redact certain sensitive keys. For instance, I'd like the backtrace of:

Enum.reduce(%User{password: "secret"}, fn _, _ -> :ok end)

...to redact "secret".

I'd really like to avoid relying on devs to remember to derive the Inspect protocol on every struct they create.

I tried to do:

defimpl Inspect, for: Map do
...
end

...but Elixir is displeased with me (inscrutable errors).
Author Public Key
npub1dwca0vsahtluny9645zl3uxcfq8k3gesh64ttxryya05xqxneqhqfdgd29