-
-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
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
Using Struct Tags to Control Encoding #58
Comments
etf.Term is just an interface type. You don't need it. What exactly are you trying to do? |
I think I was looking for how go Structs can be converted to an See: https://www.digitalocean.com/community/tutorials/how-to-use-struct-tags-in-go |
We use |
Hmm. It's a very interesting case. Actually, the value should be dereferenced during the encoding process. I'll take a look closer. |
created issue #65 |
ETF encoder encodes any struct to the erlang map using field name as a key.
will be encoded like this
|
may I ask you to check out my fix of #65? just merged into the master |
Thanks for the quick response. It's amazing what this library could do if it takes off in the Elixir/Golang community. We are using it to work with AWS services where the quality of the rust-native drivers are not yet production ready (to use with Rustler NIFs). The startup I work at is comfortable with Golang, but we know how much more productive a true functional language with pattern matching can be. So my sell to management is for Golang on the code paths were every extra ounce of performance is critical, combined with the robustness of OTP. Will test out your fix over the weekend. I'm also comfortable with golang so if you are open to contributions, let's formulate some guidelines. |
not valid any more |
How can we convert go native types into etf.Term via reflection? Is a reflection api included?
E.g. slices of map[string]interface{} to etf.Term?
The text was updated successfully, but these errors were encountered: