-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: add batch delete util #293
Conversation
bcd6948
to
6f31553
Compare
6f31553
to
9367604
Compare
b70fa43
to
9f70a7c
Compare
9f70a7c
to
065d880
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a couple of minor questions/nits but overall looks great!
batchutils/batch_operations.go
Outdated
Key: myKey, | ||
}) | ||
if err != nil { | ||
errChan <- fmt.Sprintf("error deleting key %s: %s", myKey, err.Error()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just out of curiosity - is there a reason you decided to just push strings onto this channel rather than the actual errors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly so they'd provide information about which keys failed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your comment got me thinking, and I switched this up to use a map from failing key to error message instead in a6353c2. It ended up being a little more complicated to consume, and if you think its overcomplicated let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one minor naming suggestion which you can take or leave
No description provided.