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
This is not used and was not used for quite some time, so can be safely
removed.
If there's a need to check for capitalized error messages, we can setup
stylecheck linter with enabled ST1005 (see
https://staticcheck.io/docs/configuration/options/#checks).
I ran this checker just for fun, and it gives 20+ warnings for ST1005
only, so I'm not enabling it here.
For completeness, here's how a warning from the removed script looks
like:
> Incorrect error format in file ./client/client.go: return fmt.Errorf("Status code is not OK: %v (%s)", resp.StatusCode, resp.Status)
And here's the same warning from staticcheck:
> client/client.go:214:10: ST1005: error strings should not be capitalized (stylecheck)
> return fmt.Errorf("Status code is not OK: %v (%s)", resp.StatusCode, resp.Status)
> ^
To me, it makes sense to not capitalize error messages (and fix those
that are capitalized), but it's up to maintainers to decide.
Signed-off-by: Kir Kolyshkin <[email protected]>
0 commit comments