Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
x/mobile: do away with app.Main boilerplate #13988
The purpose of app.Main is to ensure that main.main runs on "the main thread" on certain platforms. Couldn't this also be achieved by having gomobile inject initialization code into the code it is compiling?
It's just a shame that every mobile app currently needs an extra level of indentation in func main. It adds unnecessary complexity, makes you wonder "what kinds of operations can I do in main vs in the app.Main callback?". It makes mobile apps feel like second-class citizens.