Drop fatih/structs
It's not supported anymore, good to refactor its usage and drop.
see #85 #89 for an issue caused by it in nested structs.
@ferhatelmas I am looking to start contribution to go-lang projects right now. Since this is marked as "good first issue", I plan to take a stab at it.
@nchetan awesome, idea is to drop dependency and implement the existing functionality with standard library (reflect) directly. Go ahead!
Do you have documentation on how to build the code base and how to execute it? The README is very user centric and not contribution centric. Please help (I will try and figure this out till you answer back. Will leave a note if am successful)
@nchetan I will add one today: https://github.com/GetStream/stream-go2/issues/92
In the meantime, were you able to make any progress?
Yes. I have.. Is there a way to sync on slack or another software instead of conversations here? I can be reached on email, slack, phone, skype, FB messenger etc. Is there a specific one that you prefer to reach out?
I am based in Pacific Standard Time.
@ferhatelmas Also, to see an alternative approach, check if https://play.golang.org/p/1sJ3YT7pPiA works for you. This approach doesn't use reflect. If the approach does not work for any reason, please let me know what is missing? Please use this as a suggestion and let me know if it's better. If not, reflect it is....
For comparison, I also created https://play.golang.org/p/0KeJ4rej1p9 (Note: This doesn't create a finished JSON. Just a showcase). Let me know if the alternative approach is good.
@ferhatelmas I am still waiting for a response. Thoughts? If I don't hear back from you, I am going to start working on the alternative approach and send a merge request. That way, you get a chance to look at the code and try it out as well. Will wait till 16:00 (4PM) GMT time on 6/24/2020 to hear back from you (before starting on the approach I mentioned). In the worst case, I create a solution that you don't like and don't accept.
@ferhatelmas If I don't hear back from you in next couple of days, I will assume that this is not a priority issue and drop this issue and continue looking for other places to contribute.
Here's the update code right now. @ferhatelmas https://play.golang.org/p/cRVlkReyFdj
@nchetan Yes, it's not a priority. However, we can work on it slowly in that direction.
Regarding play links, they are fine for a quick show but a PR would be better for a bigger change.
Moreover, there are issues in the implementation and idea because we want to use json.Marshal and json.Unmarshal and they should do the right thing automatically. Implementation should support similar recursive structs (activity contains reactions etc.) Finally, they are marshaled into json, we keep them in the result but how they are put into structs in the memory is different than default because they are optional.
I have a similar PR here: https://github.com/GetStream/stream-chat-go/pull/84 You can give a look at the idea.