Inspectopedia Help

Redundant parentheses

Reports redundant parentheses in expressions and types.

Example:

func _(x (int), y ((string))) { } func _() { _ = (1 + 1) _ = (((1 + 1))) _ = (((1 + 1))) + (((2 + 2))) }

After the Unwrap parentheses quick-fix is applied:

func _(x int, y string) { } func _() { _ = 1 + 1 _ = 1 + 1 _ = (1 + 1) + (2 + 2) }

Inspection Details

Available in:

GoLand 2023.3

Plugin:

Go, 233.SNAPSHOT

Last modified: 13 July 2023