Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add rule suggest for !t.Before -> t.After where t time.Time #201

Open
peakle opened this issue Apr 15, 2022 · 1 comment
Open

add rule suggest for !t.Before -> t.After where t time.Time #201

peakle opened this issue Apr 15, 2022 · 1 comment

Comments

@peakle
Copy link
Contributor

peakle commented Apr 15, 2022

No description provided.

@quasilyte
Copy link
Owner

Looking at the implementations of both of these functions, it looks like we save a few nanoseconds at most in case if compiler is not smart enough to inverse the comparison operator inside the function.

That could be a good fit in go-critic as a style linter though. We have boolExprSimplify checker there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants