Delete a type parameter with an empty parameter list

Type parameters with empty parameter lists are reported as errors, but you have a quick-fix to put it right.

Tip Screenshot

Type parameters with empty parameter lists are highlighted as errors. So, if you type func printInt[](i int), GoLand will highlight [] because the IDE expects type parameters here. In this case, you can either implement type parameters or delete square brackets. To delete square brackets, try the Delete type parameters quick-fix.

How to use: Place the cursor on the empty parameter list ([]), press ⌥⏎ (macOS) / Alt+Enter (Windows/Linux), and select Delete type parameters.


Related Resources

Rename generic receivers along with a generic struct
Rename generic receivers along with a generic struct
Create a function in another package
Type a non-existing function name and generate its implementation in a package of your choice
Empower your `Printf`-like functions with coding assistance
Provide hints and highlights for message formats in custom `Printf`-like functions