-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
coreapi: Refactor options #4807
Conversation
Diff based on #4802: feat/coreapi/split-iface...feat/coreapi/refactor-opts |
abf4c3c
to
8b29773
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.
(approving the options refactor part)
I definitely prefer this. Also, nice docs!
License: MIT Signed-off-by: Łukasz Magiera <[email protected]>
8b29773
to
79f56c1
Compare
core/coreapi/pin_test.go
Outdated
@@ -145,7 +147,7 @@ func TestPinRecursive(t *testing.T) { | |||
t.Error("unexpected path") | |||
} | |||
|
|||
list, err = api.Pin().Ls(ctx, api.Pin().WithType("indirect")) | |||
list, err = api.Pin().Ls(ctx, opt.Pin.Type("indirect")) |
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.
Nicer UX would be if we had already defined functions for different pin types. Like opt.Pin.TypeIndirect
or opt.Pin.Type.Indirect
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.
Done
License: MIT Signed-off-by: Łukasz Magiera <[email protected]>
See the codeclimate (https://codeclimate.com/github/ipfs/go-ipfs/pull/4807) you can omit the _ in function receiver if it is not used. |
License: MIT Signed-off-by: Łukasz Magiera <[email protected]>
Done |
So, jenkins passed. It looks like something went wrong with the webhook. |
nice! This does feel much nicer. |
Based on #4802
Suggested by @Stebalien and @Kubuxu in #4643 (comment).