How do you run GO Code on Windows?

polaris · · 554 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>I installed a few .go files from github, but I do not know how to run them. </p> <hr/>**评论:**<br/><br/>drewindo: <pre><p>So it sounds like you&#39;re lacking a few key concepts about programming/compiling, which is <em>fine</em> but is going to make helping you over the internet a little difficult.</p> <p>I&#39;d highly recommend that you call up a programmer friend and ask them to help walk you through this.</p> <p>If you insist otherwise, then work through the link <a href="/u/john_84" rel="nofollow">/u/john_84</a> provided, it&#39;ll step you through getting started with go.</p></pre>GoTheFuckToBed: <pre><p>Can you be my programmer friend?</p></pre>binaryblade: <pre><p>If you only have the go files and no executable you will have to download the go toolchain and use it to build them.</p></pre>Omer0728: <pre><p>What is an executable?</p></pre>binaryblade: <pre><p>.exe file</p></pre>Omer0728: <pre><p>So how do I change my .go files into .exe?</p></pre>mwholt: <pre><p>Hmmm, I venture you&#39;re not a programmer. (How did you get put into a situation where you need to run .go files?)</p> <p>You need to <a href="https://golang.org/dl/" rel="nofollow">install Go</a> and then use cmd.exe with one of these: <code>go build</code> or <code>go run</code> or <code>go install</code>. This converts them to a .exe file.</p></pre>Omer0728: <pre><p>Also, what do you mean by <em>build them</em></p></pre>mc_hammerd: <pre><p>build is &#34;compiling&#34;</p> <p>source code (.go files) are &#34;compiled&#34; by a compiler program into machine language (byte code .exe)</p> <p>so use compiler to build them, go has a go language compiler</p> <p>try asking irc, #go-nuts ... and just start at the beginning &#34;i need to compile .go files&#34;. the guys from irc are really smart</p></pre>m9dhatter: <pre><p>You might want to decide whether or not you want to be a programmer first. </p></pre>john_84: <pre><p><a href="https://golang.org/doc/install" rel="nofollow">https://golang.org/doc/install</a></p></pre>

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

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