Postfix Completion

Transform an expression into another one.

Florin Pățan
completion    go   

Postfix Completion lets you transform an expression into another one, based on the postfix you specify after the dot, the current context, and the expression type.

For example, you can turn a bool expression into an if statement, or create a pointer to an expression. If anything goes not as planned, everything can be reverted via simple ⌘Z (macOS) / Ctrl+Z (Windows/Linux).

How to use:

Open the Postfix Completion page via Settings/Preferences | Editor | General to see the complete list of supported templates.

Pro tip:

Postfix Completion options are displayed as a part of the Basic Completion suggestions list. Press Ctrl+J on Windows/Linux, or ⌘J</kbd on macOS to see a full list of the Postfix Completion templates applicable in the current context.
  • You can change the names of all Postfix Completions in the Settings/Preferences dialog.
  • In the same dialog, you can also disable the templates you don't need, or even turn off Postfix Completion completely.

  • Related Resources

    Code vision
    Focus on your code while getting additional information about it.
    Handle Go errors by using a Postfix Completion
    Keep writing code as you would and use the Postfix Completion to generate the boilerplate
    Better time format in completion
    Use the commonly known date/time formatting strings while writing time formatting in Go