You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment this is out of scope for staticcheck. We don't want to start flagging over a decade of existing, valid code. We could implement it as a quickfix for gopls, if they don't already have such a check.
With the release of go1.22, range over integers is now in the language.
Code such as:
can be replaced with the more idiomatic:
It would be great if
staticcheck
could add a check to suggest such changes automatically.The text was updated successfully, but these errors were encountered: