-
Notifications
You must be signed in to change notification settings - Fork 1
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
Tag mass replace #6
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6 +/- ##
==========================================
- Coverage 63.43% 60.05% -3.38%
==========================================
Files 6 6
Lines 473 458 -15
==========================================
- Hits 300 275 -25
Misses 110 110
- Partials 63 73 +10
Continue to review full report at Codecov.
|
@@ -135,6 +136,19 @@ func dataKeyToCid(s string) (cid.Cid, error) { | |||
return cid.Decode(s[1 : len(s)-len(dataSuffixKey.String())]) | |||
} | |||
|
|||
func tagKeyToCid(k datastore.Key) (cid.Cid, error) { | |||
s := k.String() | |||
min := 4 |
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.
would having min
as a global variable be useful?
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.
It could, but it's only used in this one function.
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.
looks good
Add a convenience function to do remove and add tags in one go, without needing to provide the cids of objects to remove the tag from.
This currently does not have a progressive implementation.