Contributing to go mobile

xuanbao · · 396 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>All,</p> <p>Kind of an esoteric question, but I&#39;ve cloned the gomobile repo <a href="https://github.com/golang/mobile">https://github.com/golang/mobile</a> and I&#39;d like to contribute some source changes. I&#39;m not asking a question about the contribution process, I get that but I&#39;m struggling to build the actual repo. For instance when I try to build the &#34;bind&#34; package, I get an error complaining about path expectations for /golang.org. Despite the fact I cloned from github does my working path need to be src/golang.org/...?</p> <hr/>**评论:**<br/><br/>TheMerovius: <pre><p>A package can restrict the import path it can be imported at. This is to prevent importing the same name twice under different import paths and is often used for vanity imports (such as the golang.org/x repos).</p> <p>The package in question <a href="https://github.com/golang/mobile/blob/master/bind/bind.go#L10" rel="nofollow">does this</a></p></pre>victrolla: <pre><p>I read this Reddit every day in hopes to find awesome things like this I didn&#39;t know. </p></pre>caseynashvegas: <pre><p>Thanks for the detail there, I didn&#39;t know about this feature. I&#39;m not going to even complain about it being restricted via a comment :)</p></pre>upboatact: <pre><p>Did you clone it into your go workspace? Just in case someone does not know what a go workspace is: <a href="https://web.archive.org/web/20160624020838/http://gowithconfidence.tumblr.com/post/118493925546/getting-started-with-go-workspaces" rel="nofollow">https://web.archive.org/web/20160624020838/http://gowithconfidence.tumblr.com/post/118493925546/getting-started-with-go-workspaces</a></p></pre>caseynashvegas: <pre><p>Yeah, as I was writing the post I kinda of realized what I was doing wrong, which was to parent under my github folder instead of golang.org. </p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

396 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传