Original gopher plushie photo courtesy Sean Tasdemir.
You?ve done it. You?ve looked into Golang, and you?re convinced that it fits your use case ? or maybe you just want to get started and code in your own local environment instead of an online playground.
Then comes the inevitable question: which IDE do you use? Sure, you could go with the IDE you?ve been using for other languages, but is that the best IDE for Go?
The short answer is that there is no clear answer. Like many questions revolving IDEs, the answer is deeply subjective and dependent on what the user wants. I know that this is largely an unsatisfying answer, but it?s the only answer. To help you make that decision, I?ve aggregated a lot of information about a variety of IDEs along with some pros and cons.
Also, remember that when reading quotations from people online, always take the information with a grain of salt and use your own judgment.
Visual Studio Code (VSCode)
Image courtesy Visual Studio.
VSCode is truly an awesome all-round IDE and the Go plugin, tools, debugger and Git integration is a pleasure to use.
productivity++
? /u/_cetacea on Reddit
Perfect! Lighter than GoLand (and more features too), great integration with tooling, and just way better than every other option.
? Patrick G in Visual Studio Marketplace Reviews
It?s a great text editor, but the Visual Studio branding is very misleading, and also makes searching on Google a bit of a pain, because you?ll turn up a load of hits for entirely unrelated products.
? Garry Taylor on Quora
I switched to VS Code a while back, installed the IntelliJ key map and theme plugins to ease the transition. Within days I cancelled my IntelliJ subscription. Haven?t looked back since!
? /u/pagepagepagepage on Reddit
- Free ? no paid license needed
- Open-source
- Free Go-specific plugin with IntelliSense, code navigation, code editing, Git integration, etc.
GoLand
Image courtesy JetBrains.
Their stuff is incredible. Coming from IntelliJ to GoLand was totally painless; everything worked as expected and I was able to focus on the problem rather than the IDE.
? /u/jeremymbrooks on Reddit
If you?re used to Vim or Emacs of course the learning curve might be quite steep. Vim users may find it helpful to install and use ideaVim plugin.
? Andrey Cheptsov on Medium
I have been using VSCode, and started playing with GoLand, after I was able to fix the debugger, using JetBrains support, I am sold, I will be purchasing it, because $89 is very reasonable for such a great IDE. I do highly recommend VSCode to anyone starting GO, but if you would like a very slick and professional IDE, I really don?t think you can go past GoLand.
? /u/janderssen on Reddit
- Commercial IDE and thus not free; for organizations, $199 for the first year, $159 for the second, $119 onwards, and for individuals, $89 for the first year, $71 for the second, $53 onwards (h/t Florin P??an)
- Free for select open-source contributors as well as students
- Designed for Go specifically ? code completion, intention actions, quick-fixes, re-factorings, navigation available
- IDE has to index your project files with configured GOPATH and vendor directory (one time operation) which may take ?up to several minutes? according to JetBrains employee (as of April 2019) Andrey Cheptsov
IntelliJ IDEA with Go plugin
Image courtesy JetBrains.
I do like GoLand, but not sure it?s practically worth money if you?ve already got IntelliJ IDEA. The Go plugin is for all intents and purposes exactly the same.
? /u/Keplerspace on Reddit
If you have IDEA Ultimate 2017.3+, then you get the same features, that?s true. However if you don?t need everything IntelliJ has to offer, or you want a streamlined (and faster) IDE for Go only, then GoLand?s the way to do it.
? /u/dlsniper on Reddit
- Free if you already have IntelliJ IDEA
- Has most features GoLand offers
- Keeps you in the Jetbrains infrastructure
Vim with vim-go
Image courtesy Victor Farazdagi.
There are plugins for Sublime, IntelliJ IDEA, Komodo etc so why do we need to do this for Vim?
Honestly, those plugins suck big time ? they are hard to install, they are limited, they are not developed at fast enough pace. Don?t get me wrong, I will gladly switch to full-fledged Go IDE once it is ready, but before that, I am more productive on my default environment of choice i.e. Vim.
? Victor Farazdagi on his blog
And this saves money for buying a mouse, win-win
? /u/tdewolff on Reddit; clearly a joke, but I thought it?d be funny to include 🙂
If you straight up new, I would not recommend vim. It has a learning curve of itself.
? /u/uw_NB on Reddit
[A]mazingly responsive, provides most of the functionality of VSCode, but everything is a bit more manual and you have to be used to the ?Vim way?. The debugger is great but pretty clunky if you are coming from the world of Visual Studio or any other ?point and click? debugger. I?d recommend this the least for someone who isn?t used to Vim, even though the vim-go plugin is an amazing achievement.
? /u/HarwellDekatron on Reddit
- Formatting on save
- Has Go documentation within Vim in a split pane with :GoDoc.
- Has building and testing
- Free
LiteIDE
Image courtesy LeaseWeb.
LiteIDE is a simple, open source Go IDE. It?s notable for being the first IDE to directly target Go back in 2012. It is a C++ Qt, meaning it looks and feels similar to other compilers like Visual Studio and GCC C++.
Since it was directly designed for Golang, LiteIDE has a number of useful features for developers directly out of the box, including configurable build commands, an advanced code editor, and extensive Golang support. Other features include code management, a gdb and Delve debugger, auto-completion and theming with WordApi, MIME type based system, and more.
? Jane Elizabeth on JAX Enter
- Open-source (so, free)
- Configurable build commands
- Auto-completion system
- Cross-platform, as are the rest
Atom with go-plus package
Since Atom is not truly an IDE but a highly modular text editor, you will have to take the time to find and install plugins you need to make it work like a true IDE.Even the base Atom editor comes with a lot of plugins installed already. The most essential features are official plugins from the Atom team so you don?t have to hunt them down.
? Endi Sukaj on Slant
I got so fed up with Atom that I switched to VS Code for Go development. Neither is perfect, but Atom is so slow it?s painful, and it crashes regularly. VS Code also has much better Go debugger integration. I would recommend turning off Go reference counts in CodeLens; there?s an open defect right now because it eats the CPU alive if it?s on.
? /u/carsncode on Reddit
- Free
- Support for tools, build flows, linters, auto-complete, formatting, testing, documenation, debugging, etc.
Related reading
Go Modules with Private Git Repositories
How to configure Go Modules to work with private Git Repositories, with examples for both local development and Docker.
medium.com
There are a few more, but these frequently are talked about. Which one is your favorite?