Can goland have a timeout for unused variables after their declaration

Whenever I'm writing methods or so, I find the erroneous unused variable warning to be nagging. Is there a way to remedy this recurring warning?

0
2 comments

Hi there,

Thank you for your question! There are two potential solutions to this:

  1. You can change a global inspection highlighting delay via Settings | Editor | Code Editing | Autoreparse delay , or
  2. You can try disabling the unused variable inspection via Settings | Editor | Inspections (you would need to find “Unused global variable” or "Unused constant" options in the Declaration redundancy section of Go inspections).

I hope this helps. Please let me know if there is anything else I can help you with and I'll be at your service.

1

Please sign in to leave a comment.