Inspectopedia Help

Unused constant

Reports constants that are defined but are never used in code.

func main() { const i = 100 }

Unlike unused variables and imports, this code will compile. Unused constants might increase your code base and slow down program compilation. To delete the unused constant, consider using the Delete constant quick-fix.

Inspection Details

Available in:

GoLand 2023.3



Last modified: 13 July 2023