GoLand 2026.2 Help

Analyze code for syntax updates with go fix

GoLand provides inspections based on go fix. These inspections help you update code for language and standard library changes introduced in later Go versions.

The Go toolchain analyzes your code. GoLand displays the results as inspections in the editor. Each inspection identifies an outdated construct. Inspections that support automatic updates provide a quick-fix.

Apply a syntax update in the editor

GoLand highlights syntax updates with a blue underline and the syntax update icon (Syntax update icon).

Apply a syntax update

  1. Place the caret at a highlighted code element.

  2. Click the light bulb icon or press Alt+Enter.

  3. Select the quick-fix, then press Enter or click the quick-fix.

    Quick-fix menu with Replace with new selected for a highlighted Go syntax update.

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

Analyze code for additional syntax updates

After you apply a syntax update, GoLand displays the Analyze code for other syntax updates link in the editor.

Analyze code for additional syntax updates

  1. Click Analyze code for other syntax updates.

    Editor with the Analyze code for other syntax updates link shown after a Go quick-fix is applied.
  2. In the Specify Syntax Update Scope dialog, select Whole project, the current file, or Custom scope.

  3. Click Analyze.

GoLand displays the results in the Problems tool window under Go | Go fix.

Review and apply syntax updates

In the Problems tool window, select an inspection to review its description, affected files, and available quick-fix.

Apply syntax update quick-fixes

  • To update one occurrence, expand the inspection and file nodes, select the occurrence, and click the quick-fix button. The button label identifies the fix for the selected inspection.

    Go fix inspection group with two problems and the Apply the go fix suggestion button.
  • To update all occurrences in an inspection group, select the group and click Apply the 'go fix' suggestion.

    Go fix inspection group with two problems and the Apply the go fix suggestion button.

Run an inspection in another scope

  1. In the inspection details, click Run inspection on

  2. In the inspection scope dialog, select the whole project or a custom scope.

    To include code injected into strings, select Inspect injected code.

  3. Click OK.

    Problems tool window with Go fix results and the inspection scope set to Whole project.

Configure syntax update inspections

Go fix inspections use the Syntax updates severity and the Go syntax update highlighting style by default.

Configure syntax update inspections

  1. Open settings by pressing Ctrl+Alt+S and navigate to Editor | Inspections.

  2. Expand Go | Go fix.

  3. Select an inspection. To configure all Go fix inspections at once, select the Go fix group.

  4. Select a value from the Severity list.

  5. Select a value from the Highlighting in editor list.

  6. Apply the changes and close the dialog.

    Inspections settings with the Go fix group selected and syntax update highlighting options.
10 July 2026