The Hitchhiker's Guide to GoLand
It will be easier for you to win in our Code Golf if you are well prepared.
This hitchhiker's guide contains a short overview of features in GoLand, hidden hints, and a crash training course!
IDE Features Trainer plugin is a crash course designed especially for Code Golf.
Quick-fixes
GoLand comes with many quick-fixes that help you instantly repair most detected code issues. Simply press Alt+Enter over a highlighted code issue, and choose the best way to fix the problem or improve the code. For example, GoLand lets you quickly add missing methods if the expected type is an interface.
Postfix Completion
GoLand ships with a bunch of predefined Postfix Completion templates. Each one contains a specific code template you can easily add around an expression you’ve just typed. A template expands when you type its abbreviation (postfix) after a dot and press the expansion key, or when you select the abbreviation in the code completion popup. For example, use .aappend to prepend an expression with a built-in append function call and assign its result to the expression.
Intention Actions
Intention actions cover a wide range of situations from warnings to optimization suggestions (Alt + Enter). As soon as the IDE finds a way to alter your code, it displays a yellow bulb icon in the editor next to the current line. For example, the Add format string argument intention action generates a placeholder for any provided expression via a popup.
Live Templates
GoLand provides many predefined Live Templates, also known as code snippets, available under Preferences | Editor | Live Templates. Each live template has its own template abbreviation. To expand it, type the corresponding template abbreviation and press Enter.
Refactorings
GoLand has a set of Go-aware refactorings: Rename, Move, Copy, Change Signature, Extract Interface, Extract Method, and more. Use Ctrl+T or Ctrl+Shift+Alt+T to aсcess them all via the Refactor This popup menu.
Code Completion
GoLand has many ways to complete code for you. They range from Smart Code Completion, which gives you a list of the most relevant symbols that are applicable in the current context (press Ctrl+Shift+Space), to method-like completion for functions that provide a list of all suitable functions for each specific case (just type a dot after an expressions and press Ctrl+Space+Space to see all of the available completion options).