I want to go from MyMod to %MyMod{} in order to keep backwards compatibility with an older configuration format in a library I'm making.
The module is already defined and calls the defstruct macro.
The Kernel function struct/2 should work fine:
struct(MyMod) # => %MyMod{}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With