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 multiple args to rm #49

Merged
merged 2 commits into from
Sep 4, 2016
Merged

Conversation

grantseltzer
Copy link
Contributor

@grantseltzer grantseltzer commented Aug 28, 2016

This just adds a loop around the functionality of rm to now support multiple arguments.

Link to example usage: http://i.imgur.com/Fm71rR6.png

@diwakergupta
Copy link
Collaborator

FYI the image link doesn't work

return err
}
for i := range args {
path, err := validatePath(args[i])
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we do validation on all args before executing on any arg?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, If there are multiple arguments and one doesn't exist, should the others still be removed?

Copy link
Collaborator

Choose a reason for hiding this comment

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

No, lets just fail fast if validation fails.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, should have that fixed today.

@grantseltzer
Copy link
Contributor Author

@diwakergupta updated link, not sure why that was happening

Signed-off-by: grantseltzer <grantseltzer@gmail.com>
@grantseltzer
Copy link
Contributor Author

@diwakergupta I've updated this PR to now validate and check meta data before removing. It will fail if any arguments are invalid and nothing will be removed.

@diwakergupta diwakergupta merged commit feb2732 into dropbox:master Sep 4, 2016
@diwakergupta
Copy link
Collaborator

Thanks @grantseltzer . One thing I want to start doing is wherever we have multiple file operations, we can easily parallelize them, especially in Go via goroutines. That should help w/ performance, as the number of args increase.

@grantseltzer
Copy link
Contributor Author

Excellent idea! I'll work on that for future contributions.

Thanks for the merge @diwakergupta!

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.

None yet

2 participants