Inspectopedia Help

Redundant comma

Reports commas that may be omitted in the end of argument lists and composite literals.

The IDE suggests removing commas that are considered optional. Removing these commas might improve code readability.

Example:

s := []int{1, 2,} // the last comma may be omitted

Inspection Details

Available in:

GoLand 2023.3

Plugin:

Go, 233.SNAPSHOT

Last modified: 13 July 2023