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

coreapi: Refactor options #4807

Merged
merged 3 commits into from
Mar 29, 2018
Merged

coreapi: Refactor options #4807

merged 3 commits into from
Mar 29, 2018

Conversation

magik6k
Copy link
Member

@magik6k magik6k commented Mar 11, 2018

Based on #4802

Suggested by @Stebalien and @Kubuxu in #4643 (comment).

@magik6k magik6k added status/blocked Unable to be worked further until needs are met topic/core-api Topic core-api labels Mar 11, 2018
@magik6k magik6k requested a review from Kubuxu as a code owner March 11, 2018 18:10
@ghost ghost assigned magik6k Mar 11, 2018
@ghost ghost added the status/in-progress In progress label Mar 11, 2018
@Kubuxu
Copy link
Member

Kubuxu commented Mar 12, 2018

Copy link
Member

@Stebalien Stebalien left a 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]>
@magik6k magik6k removed the status/blocked Unable to be worked further until needs are met label Mar 24, 2018
This was referenced Mar 24, 2018
@@ -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"))
Copy link
Member

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

Copy link
Member Author

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]>
@Kubuxu
Copy link
Member

Kubuxu commented Mar 25, 2018

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]>
@magik6k
Copy link
Member Author

magik6k commented Mar 26, 2018

Done

@Kubuxu Kubuxu added RFM and removed status/in-progress In progress labels Mar 26, 2018
@Stebalien
Copy link
Member

So, jenkins passed. It looks like something went wrong with the webhook.

@whyrusleeping
Copy link
Member

nice! This does feel much nicer.

@whyrusleeping whyrusleeping merged commit 9ed9ab5 into master Mar 29, 2018
@whyrusleeping whyrusleeping deleted the feat/coreapi/refactor-opts branch March 29, 2018 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFM topic/core-api Topic core-api
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants