How do I make 'go get' to display the progress of the cloning process?

agolangf · · 682 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>I hate how quiet that process is. Adding <strong>-x</strong> doesn&#39;t quite cut it, it just shows me the commands</p> <hr/>**评论:**<br/><br/>divan0: <pre><p>As &#39;go get&#39; doesn&#39;t provide progress bar functionality, you left with system level tools - strace/dtruss and <a href="http://www.ivarch.com/programs/pv.shtml">pv</a> for progressbar :)</p> <p><strong>MacOS X:</strong></p> <pre><code>dtruss go get github.com/divan/gofresh 2&gt;&amp;1 | pv -i 0.05 &gt; /dev/null </code></pre> <p><em>(make dtruss available for non-root first: sudo chmod u+s /usr/bin/dtruss)</em></p> <p><strong>Linux:</strong></p> <pre><code>strace -f -e trace=network go get github.com/divan/gofresh 2&gt;&amp;1 | pv -i 0.05 &gt; /dev/null </code></pre> <p>:-D</p></pre>Saltones: <pre><p><a href="http://i.imgur.com/WW5bo3l.png" rel="nofollow">Doesn&#39;t seem to work</a></p></pre>divan0: <pre><p>Either you got some &#39;go get&#39; error (and it was muted) or you have different GOPATH. )</p></pre>Saltones: <pre><p>Good call. I also didn&#39;t have strace installed. About this tool of yours, where is the executable placed after that process?</p></pre>divan0: <pre><p>In $GOPATH/bin. It&#39;s common practice to add $GOPATH/bin to your PATH variable, btw.</p></pre>captncraig: <pre><p><code>go get -v github.com/whoever/whatever</code></p> <p>Still has long quiet gaps if you are cloning massive repositories, but it is definitely better than the default.</p></pre>

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

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