1-day old GO noob

agolangf · · 1017 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>So I spent my night after the little one went to bed last night installing/configuring Go, Git and Atom (with Go-Plus), and tested a quick hello world web request handler to make sure everything is working...which it is!</p> <p>My first question is...is there a way to have my Atom editor also have shortcuts/ability to do &#34;go build&#34; or &#34;go install&#34; commands either on demand or automatically, and possibly even the ability to execute the compiled .exes?</p> <p>I&#39;m looking to have as much functionality done from one program (Atom) as possible, and rely less on command windows. </p> <p>Disclaimer for 10 years I&#39;ve been immersed in the Microsoft stack and have 0 experience in anything else so that&#39;s why I&#39;ve decided to learn Go and also why I&#39;m so clueless</p> <hr/>**评论:**<br/><br/>dlsniper: <pre><p>Use any JetBrains IDE (including the free ones) with the Go plugin for them and they should help you get off the ground with much less configuration than other editors. </p></pre>kavehmz: <pre><p>I am also using Atom with &#34;Go Plus&#34;, &#34;go-rename&#34; and &#34;Script&#34; packages. Works fine for me.</p> <p>Especially if you are familiar with Atom and how to customize it, you might like it better than some other environments.</p></pre>Stryfex19: <pre><p>So far my experience with Atom seems great. There are some odd things with auto-complete that I find weird though like if I type &#34;func ma&#34; and the autocomplete comes up to select the &#34;main()&#34; function, I hit enter and end up with &#34;func func main() {}&#34; which I then have to delete the first func...I&#39;m sure I&#39;ll get used to how to manipulate it properly.</p> <p>It seems like a good editor choice so far</p></pre>Ainar-G: <pre><p>This doesn&#39;t answer your question, but if you&#39;ve been immersed in the Microsoft stack for so long, why not proceed with it and use <a href="http://code.visualstudio.com/" rel="nofollow">VS Code</a>? Of all editors I&#39;ve tried, it seems to have the nicest, most seamless integration with Go tools. It even has visual integration with the Delve debugger. I myself am a vim+vim-go kind of guy, but if I weren&#39;t used to vim so much, I&#39;d use VS Code to write Go code.</p></pre>Stryfex19: <pre><p>Thanks to everyone for the replies! I spent another hour or so with it last night and even after just that little bit more time I&#39;m getting more into the groove and generally getting the hang of the process. I&#39;m excited to get past alot of the &#34;language learning&#34; that I&#39;m currently doing and into building </p></pre>jeffrallen: <pre><p>Go does not need an IDE. Work your way through the Go Tutorial online, and then Effective Go (use Notepad and cmd.exe). When you see the fundamentals of Go and it&#39;s tools, then you&#39;ll be equipped to decide how much or whether you want an IDE at all.</p></pre>Stryfex19: <pre><p>I&#39;ve been working through some examples from the book &#34;The Go Programming Language&#34; and it&#39;s going great so far in terms of no issues (and the language itself seems great so far) but being in the Visual Studio world for the past 10 years it&#39;s tough to get used to spending so much time with CMD heh</p></pre>dbud: <pre><p>Go is definitely more geared towards &#34;the unix way&#34; of command lines and hand running stuff.<br/> All my go dev iterations are basically: go install ./... &amp;&amp; appname<br/> where app name is the executable i want to run.<br/> Bouncing the app consists of me hitting Ctrl-C, Up arrow, and enter. </p> <p>Not as straight forward as hitting F5 (or whatever VS uses these days), but also not that bad. </p> <p>As for editors doing this automatically, i haven&#39;t seen one.<br/> Probably due to not having any concept of a project / solution.</p> <p>You may have luck with Intellij IDEA and the go plugin. </p> <p>That all said, <a href="/u/jeffrallen" rel="nofollow">/u/jeffrallen</a> is right. Simple editor and command line is probably your best bet. Not sure I&#39;d go as far as Notepad. I use Sublime Text with GoSublime plugin myself.</p></pre>zeroZshadow: <pre><p>install atom-build. It allows you to throw the go build command behind a hotkey in atom. terminal is also a nice package, allowing you to start your build executable from inside atom.</p></pre>Stryfex19: <pre><p>oooo thanks, those seem great! i&#39;ll install them tonight after work!!</p></pre>izuriel: <pre><blockquote> <p>being in the Visual Studio world for the past 10 years it&#39;s tough to get used to spending so much time with CMD</p> </blockquote> <p>So take learning Go as a chance to correct that. As a person who has hired and interview developers in the past one of my major turn offs is if they can&#39;t work inside a command line. I get that Windows and Windows development tools don&#39;t let you get away with a lot of command line work (and the command line is terrible in Windows). Personally I recommend installing Git Bash (cygwin itself can be an overload when starting out) to get some unix tooling and behavior (and BASH!) and then use ConEmu setting up your tab defaults to run Bash. I recommend working this way and you&#39;ll either still not catch on or you end up loving the command line so much you&#39;ll wonder why Windows tries so desperately hard to keep you out of it (I feel in love with it, 90% of my work is through a terminal now -- albeit I quit working on Windows machines and got a Mac)!</p></pre>Stryfex19: <pre><p>That&#39;s essentially the main motivation for this whole exercise...I&#39;m trying to broaden my skillset and knowledge-base...when you get silo&#39;d into a certain type of work for a long time it tends to shape your thinking and I&#39;m just really in the mood to spruce up my abilities.</p> <p>not to mention that over the past few years getting a chromebook for my wife, and various android devices, which have both been tastes of an &#34;alternative to microsoft&#34; i&#39;ve really gotten a sense that I really like that alternative</p></pre>izuriel: <pre><p>Well, welcome to the community. I think your jaunt into new territory is a worthwhile endeavor and I hope that you find it enjoyable. I agree with you comments on being silo&#39;d. I&#39;m working with some Ruby developers that have a hard time seeing past ruby&#39;s way of doing things when approaching problems. Most of the time the differences aren&#39;t worth bringing up but it would be great if every engineer had at least two languages they specialized in to vary their approaches. </p></pre>

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

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