Complete Current Statement

Add trailing commas or braces and move the cursor to the right place with a single keystroke.

GoLand can complete statements and add required trailing commas for any composite literals (like struct, slice, etc.), and even place caret in a position where you can just start typing the next statement.

After typing parentheses, trigger the Complete Current Statement action, ⇧⌘⏎ (macOS) / Ctrl+Shift+Enter (Windows/Linux), to add curly braces and move ethe cursor down to the beginning of the next row.

Related Resources

Code Completion in Language Injections
Code Completion in Language Injections
See how to use code completion inside strings and other places.
Completion for non-imported Go Modules
Completion for non-imported Go Modules
Import a module in to your project.
Completion with the Tab key
Completion with the Tab key
A small, but handy feature that makes it a little easier to complete symbol names.