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

Improve control flow readability of purgeFile #17565

Open
redwrasse opened this issue Mar 11, 2024 · 0 comments
Open

Improve control flow readability of purgeFile #17565

redwrasse opened this issue Mar 11, 2024 · 0 comments
Labels
area/clientv3 priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. type/feature

Comments

@redwrasse
Copy link
Contributor

What would you like to be added?

Improve control flow readability of purgeFile function in client/pkg/fileutil/purge.go

Why is this needed?

purgeFile function in client/pkg/fileutil/purge.go control flow related to fnames and newfnames variables is somewhat difficult to follow, with fnames reassigned value of newfnames after filtering original fnames, newfnames slice then updated in for loop, and then finally both fnames and newfnames slice lengths used to determine writes to purgec channel.

(a changed isn't strictly needed but it could improve readability)

@jmhbnz jmhbnz added area/clientv3 priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/clientv3 priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. type/feature
Development

No branches or pull requests

2 participants