GoLand 2026.2 Help

Analyzing code for syntax updates with go fix

GoLand supports inspections based on go fix. These inspections help you adopt language and standard library updates introduced in newer Go versions.

The analysis is performed by the Go toolchain. GoLand uses the results provided by the Go toolchain and reports applicable updates as inspections in the editor. Each inspection reports a specific outdated construct, and most inspections provide a quick-fix that rewrites the code to the newer form.

Applying syntax updates

When a syntax update is available, GoLand highlights the affected code in the editor. You can apply a fix using the intention actions menu or run the inspection over a larger scope to update multiple files at once.

By default, these updates are highlighted with a blue underline and marked with the language updates icon (Syntax update icon).

Apply syntax updates by using a quick-fix

  1. Place the caret at the code element that you want to modify. Then click the light bulb icon (or press Alt+Enter) to open the list of suggestions.

  2. Press Enter or click an intention on the list to apply it.

    For more information about quick-fixes, refer to Intention actions.

Analyze a project for go fix updates

You can inspect your entire project and review all available go fix updates in the Problems tool window.

Analyze a project for go fix updates

  1. From the main menu, select Code | Inspect Code.

  2. Select the inspection scope and run the analysis.

  3. In the Problems tool window, expand the Go fix node.

  4. Review the available updates and select an inspection result.

  5. Apply the suggested quick-fix.

Syntax updates use a dedicated inspection severity level called Syntax updates. You can configure this level the same way as other inspections in the settings.

Change severity for syntax updates

  1. Press Ctrl+Alt+S to open settings and then select Editor | Inspections.

  2. Navigate to Go | Syntax updates.

  3. Select an inspection from the list.

  4. From the Severity list, select a new severity level.

  5. From the Highlighting in editor list, select the style that you want to use to highlight code fragments in the editor.

  6. Apply the changes and close the dialog.

    The modified inspection will now have the new severity level in the selected profile.

    For more information about inspections, refer to Code inspections.

    Change severity for syntax updates

After you apply a quick-fix, GoLand suggests analyzing your code to find other places where syntax updates can be applied.

Analyze code for additional syntax updates

  1. Click Analyze code for syntax updates.

  2. In the Specify Syntax Update Scope dialog, select the scope and click Analyze.

Alternatively, you can run code analysis for syntax updates from go.mod.

Running analysis from go.mod

  • In go.mod, click Analyze code for syntax updates. Click Show highlights of Go to see an overview of new languages.

You can apply a quick-fix to a single occurrence or apply all available fixes at once.

Apply syntax update quick-fixes

  • To apply a fix to a specific occurrence, open the Problems tool window, select the occurrence, and click Apply Fix.

  • To apply fixes in bulk, open the Problems tool window, right-click a group under the Syntax updates node, and select the available quick-fix. You can also click the Apply Fixes button for the group.

10 July 2026