<p>I'm very interested in Go and would like to write a project in it.</p>
<hr/>**评论:**<br/><br/>siwu: <pre><p>Previous thread at <a href="https://www.reddit.com/r/golang/comments/61r6m0/whats_your_experience_with_go_on_mobile_bind_only/" rel="nofollow">https://www.reddit.com/r/golang/comments/61r6m0/whats_your_experience_with_go_on_mobile_bind_only/</a></p></pre>egonelbre: <pre><p>My experience for Android with gomobile has been better than with the official toolchain.</p></pre>caseynashvegas: <pre><p>As <a href="/u/siwu" rel="nofollow">/u/siwu</a> pointed out this topic has came up recently. I'm going to answer again because there isn't a ton of information out there for Go mobile. </p>
<p>My experience has been great so far, but I've been focused on what is called SDK applications, with go bind. I haven't done a pure Go only application yet. My experience with go mobile has been awesome so far with only the rare hiccup. </p>
<p>Here is what you get:</p>
<ol>
<li> The full power of the go platform, standard libraries, go routines, channels, error handling.</li>
<li> A great way to share code between native iOS and Android applications. So far I've not found a better way to share code without other non-desirable outcomes (I'm looking at you Xamarin, lol)</li>
</ol>
<p>What you have to watch out for:</p>
<ol>
<li> Only certain types can be part of your public interface to your go library.</li>
<li> The occasional head scratching error message</li>
<li> Harder to debug than pure native (no break points) </li>
</ol></pre>jonbonazza: <pre><p>A point of confusion for me and go bind, can I use channels in my Go code as long as I don't expose them as return types or paramters?</p></pre>caseynashvegas: <pre><p>Yes, channels and go routines work as they should. Besides code sharing this maybe the biggest win, having the great concurrency model of go available. Take caution to understand the application life cycle however for each platform.</p></pre>
Has anyone used Go Mobile to compile apps for iOS and Android? If so, how was your experience?
agolangf · · 897 次点击这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
0 回复
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传