Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
x/mobile/bind: support slices of supported structs #13445
hi @ioArchman, I made a quick repo here:
If you think it can work for you, you will probably want to fork it and modify the render.go function to add/remove the methods you want on your collection wrapper. Feel free to make a comment on the project if you have any questions. Its pretty directly adapted from another tutorial on go generics, which you can find here http://www.onebigfluke.com/2014/12/generic-programming-go-generate.html
Keep in mind, I don't consider this a good solution. It feels hacky working with a wrapper on the objective-c/swift side, but it does work. Really would prefer something that feels more natural.
Just linking the stack overflow question here : https://stackoverflow.com/questions/44382115/golang-gomobile-tool-for-cross-platform-slices-of-struct-return-type