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

refactor: Make fsnotify event more readable. #11836

Merged
merged 1 commit into from
Jan 25, 2023
Merged

refactor: Make fsnotify event more readable. #11836

merged 1 commit into from
Jan 25, 2023

Conversation

yanggangtony
Copy link
Contributor

@yanggangtony yanggangtony commented Dec 27, 2022

Signed-off-by: yanggang gang.yang@daocloud.io

As fsnotify v1.6.0 mentioned.
We can replace

 if event.Op&Write == Write && !(event.Op&Remove == Remove) {
  }

with

 if event.Has(Write) && !event.Has(Remove) {
  }

will be more readable and maintenance.

@codecov
Copy link

codecov bot commented Dec 27, 2022

Codecov Report

Base: 47.44% // Head: 47.44% // No change to project coverage 👍

Coverage data is based on head (c065216) compared to base (6069ded).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #11836   +/-   ##
=======================================
  Coverage   47.44%   47.44%           
=======================================
  Files         245      245           
  Lines       41690    41690           
=======================================
  Hits        19778    19778           
  Misses      19925    19925           
  Partials     1987     1987           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@yanggangtony yanggangtony changed the title Make fsnotify event more readable. feat: Make fsnotify event more readable. Dec 27, 2022
Signed-off-by: yanggang <gang.yang@daocloud.io>
@yanggangtony
Copy link
Contributor Author

This pr have been a time for review.
Would you have time to review it?
@crenshaw-dev @jannfis @rbreeze

Copy link
Member

@jannfis jannfis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks, and sorry for the delay!

@jannfis jannfis changed the title feat: Make fsnotify event more readable. refactor: Make fsnotify event more readable. Jan 25, 2023
@jannfis jannfis merged commit 9962620 into argoproj:master Jan 25, 2023
emirot pushed a commit to emirot/argo-cd that referenced this pull request Jan 27, 2023
Signed-off-by: yanggang <gang.yang@daocloud.io>

Signed-off-by: yanggang <gang.yang@daocloud.io>
Signed-off-by: emirot <emirot.nolan@gmail.com>
schakrad pushed a commit to schakrad/argo-cd that referenced this pull request Mar 14, 2023
Signed-off-by: yanggang <gang.yang@daocloud.io>

Signed-off-by: yanggang <gang.yang@daocloud.io>
Signed-off-by: schakrad <chakradari.sindhu@gmail.com>
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

Successfully merging this pull request may close these issues.

2 participants