All About Code Completion in GoLand

Code completion is one of the greatest benefits of using an IDE: it reduces the number of things that you need to memorize and helps avoid typos and other common mistakes. It is useful for both professional developers who can write clean code faster, and for beginners who get easier ways of learning programming languages.

In this article we’re going to have a look at the many code completion features in GoLand, and how to effectively use them.
Continue reading

Posted in Features, Tutorial | Tagged , | Leave a comment

GoLand 2018.3.2 is out!

Try it via Toolbox App, or update from any earlier 2018.3 with the use of Help | Check for Updates command, or just download a copy from our website.

Download GoLand 2018.3.2

Here’s a list of notable issues this update addresses:

GO-6474 — The debugger correctly displays variable names when their type is an interface.

GO-6523 — Code formatting formats the last parameters with three dots in variadic functions equal to go fmt rules.

GO-6488 — GoLand doesn’t show redundant Save files during the commit notifications when gofmt checkbox is enabled in the commit dialog.

GO-6596 — We’ve solved the problem with unresolved references to packages.

GO-6575 — The IDE correctly calculates array types when array length is specified via expressions like len(otherArray).

GO-6558 — The Move refactoring will preserve line feeds around refactored declarations.

Don’t forget that we always appreciate your feedback, so please share it with us here in comments, or Twitter, or our issue tracker. Thanks!

Posted in Releases | Tagged , | 5 Comments

Go templates made easy

Go ships with its own template engine, split into two packages, text/template and html/template. These packages are similar in functionality, with the difference that html/template allows a user to generate HTML code that is safe against code injection, making it suitable for use on web pages and emails. These packages are also used in other applications such as the configuration for Helm, the Kubernetes package manager, assisting with code generation and much more.

Continue reading

Posted in New Features | Tagged , , , | Leave a comment

Refactorings in GoLand: Rename refactoring

This is the last blog post in the series of refactorings so I wanted to save the most used refactoring the IDE has for last.

It’s one of the most powerful tools that I use and it works like magic every time. You might think that renaming things is pretty straightforward, but there are some lesser-known use cases which can really boost your productivity that I want to cover today.

But first, let’s start with this example code:

Let’s say that we want to rename the Position field to be a bit more explicit, like “JobTitle”.

We can press Shift+F6 and start renaming the field, press Enter when we are done, and that’s it.

Refactorings - Rename

However, if we change our example slightly to include a JSON string and try to call the refactoring again, then the IDE will suggest renaming the JSON field as well.

This is because the IDE understands that our string is of type string and can perform the Rename operation inside strings as well.

As with the other refactoring features, you can reject renaming the field at any time by selecting the usage you want to omit and pressing the Delete key.

If you press Shift + F6 twice, then you’ll get the following dialog which further allows you to configure where the rename operation takes place and how it should behave.

Refactorings - Rename 2

Since conflicts can appear during the rename operation, the IDE will also handle this for you and allow you to correct this before the code becomes polluted by an accidental naming collision.

Refactorings - Rename 3

This is not all. The rename operation is available across a wide range of languages and support tools as well.

For example, if we connect the IDE to a database, then it can also rename database fields directly from the query that we have.
We can see this in action in the example below:

Refactorings - Rename 4

To learn how to connect the IDE to a database, you can visit our documentation.

This concludes our short series on IDE refactoring tools. We went from changing function signatures to moving identifiers across files and even packages, to renaming them along with any other reference and even with database fields.

I hope you will find this series useful and it will increase your productivity whether you are just starting with Go, you are new to GoLand, or you are a more experienced user. In case you missed our previous posts, here’s the list of the previous topics in the series:

– Rename
Move & Copy
– Extract variable/constant
– Extract function/method
– Inline variable/constant
– Change Signature

Please let us know in the comments section below, on Twitter, or on our issue tracker your thoughts on this and what other topics we can handle in the future.

Feedback on the IDE itself is also welcome and we look forward to hearing from you on how to make your experience more enjoyable and productive.

Posted in Features, Tutorial | Tagged , | Leave a comment

GoLand 2018.3.1 is available for download

A more polished version of GoLand 2018.3, GoLand 2018.3.1, is already available for download. Get this update on your machine in one of three ways: download from the website, update via Toolbox App, or apply as a patch on top of 2018.3 (use Help | Check for Updates).

This update contains bug-fixes in different areas. We recommend that you upgrade and get your IDE working even smoother.

Download GoLand 2018.3.1

Continue reading

Posted in Releases | Tagged , | Leave a comment

What’s Next: Roadmap for GoLand 2019.1

Two weeks ago we released GoLand 2018.3 which introduced a new Change Signature refactoring, debugging for Google App Engine apps, the ability to analyze core dumps, and support for Testify and Mozilla rr. It also improved code completion, added new code inspections and intention actions, and more.

If you haven’t checked out these new features yet, head on to our what’s new page. Or, if you prefer watching rather than reading, we also have this short 5-minute video for your viewing pleasure.

Over these two weeks, we’ve sorted out your feedback and discussed the features that we want to deliver in the next major version. Let’s go behind the scenes and take a sneak peek at what GoLand 2019.1 will likely bring.

But before we do that, we’ll continue our tradition of saying a heartfelt THANK YOU to all our evaluators! These kind people help us deliver a better IDE with each release and each EAP build, telling us about their product experiences and giving us their candid feedback and suggestions.

Today, we’d like to specially mention these wonderful folks:

  • Sergej Zagursky (YouTrack username: g7r)
  • Roland Illig (YouTrack username: roland.illig)
  • Stuart Carnie (YouTrack username: scarnie)
  • Denis Cheremisov (YouTrack username: sirkon)

As a token of our gratitude, each of you is getting a free 1-year subscription for GoLand! Use it to extend your current subscription or start a new one. You will receive an email with a coupon code and instructions on how to redeem it. Ping us if you don’t!

Now on to our roadmap!

Please note we can’t guarantee that all of the features listed below will be included in GoLand 2019.1.
Continue reading

Posted in Roadmap | Tagged , | 14 Comments

Refactorings in GoLand: Move refactoring

In this blog post, we will cover the Move refactoring option as we continue to explore the refactorings provided by the IDE.

If you want to check out the other articles from this series, you can find them all here (links will be updated as new articles are published):

– Move & Copy
Extract variable/constant
Extract function/method
Inline variable/constant
Change Signature

This is currently my second favorite refactoring, especially during the phase of the project that needs me to restructure how the code is organized.

With the Move refactoring, you can take any top-level named identifier from your source code and move it either to a separate file or to an entirely different package, existing or new.

In the example below, we can see how to move a function declaration to a new file.

Refactorings - Move

The Move refactoring does not only move the declarations, but will also add the required imports, update the references to the identifier, and perform a cleanup of the previous definition place of the identifier so that your code can still work.

Refactorings - Move 2

You can choose to export declarations when using this move, move related declarations, or move multiple declarations at once. And if you want to see which code paths are affected by this change, you can preview the locations that will be affected, with the option to atomically undo everything using the Undo shortcut.

Refactorings - Move 3

That’s it for today. We hope the Move refactoring will become an invaluable tool under your toolbelt if it isn’t already!

As we approach the end of this series on refactorings, we look forward to your feedback both on what we can talk about in future posts, as well as what features you’d like to see in the IDE.

General feedback about the IDE is very welcome, too, so please don’t hesitate to share your thoughts in the comments section below, on our issue tracker, or on Twitter.

Posted in Features, Tutorial | Tagged , | Leave a comment

GoLand 2018.3 released!


Get ready for the Change Signature refactoring, Testify support, and many new tools in the debugger such as Google App Engine, Go core dumps, and Mozilla rr. Find new code inspections and intention actions, improved code completion, support for diagrams, updates for VCS, Docker, Kubernetes, and much more.

Download GoLand 2018.3

To take in all the new features, with GIFs and full descriptions, please visit the What’s New page.

Let’s have a quick look at the highlights of this release.
Continue reading

Posted in New Features, Releases | Tagged | Leave a comment

GoLand 2018.3 Beta: Change Signature refactoring, debugging Google App Engine, Testify, Go core dumps, and more

The upcoming GoLand 2018.3 release has reached the Beta milestone!

If you’re new to our release cycles, we announce a Beta when we’ve packed everything we plan to deliver in the major update. Since this moment and until the release date, our team is focused only on polishing everything off.

Download GoLand 2018.3 BETA

Compared with our Early Access builds, the Beta version is quite stable though it may still have bugs and other issues.


Let’s have a look at what the upcoming release will have inside!
Continue reading

Posted in EAP, New Features | Tagged | Leave a comment

GoLand 2018.3 EAP 5: better Rename refactoring, Cassandra database support, and JSON enhancements

GoLand 2018.3 EAP 5 is available! Grab your copy from the website, update via Toolbox App, or install it beside your stable GoLand version.

Download GoLand 2018.3 EAP

Continue reading

Posted in EAP, New Features | Tagged , , , | Leave a comment