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

commands/filestore: use new cmds lib #5673

Merged
merged 5 commits into from
Nov 6, 2018

Conversation

overbool
Copy link
Contributor

Refer: #5664

License: MIT
Signed-off-by: Overbool overbool.xu@gmail.com

@overbool overbool requested a review from Kubuxu as a code owner October 27, 2018 03:59
@kevina kevina self-requested a review October 28, 2018 06:06
@kevina
Copy link
Contributor

kevina commented Oct 28, 2018

There seams to be a lot of changes here. Please give me a few days to look this over.

core/commands/filestore.go Outdated Show resolved Hide resolved
core/commands/filestore.go Outdated Show resolved Hide resolved
@@ -150,7 +151,7 @@ For ERROR entries the error will also be printed to stderr.
Encoders: cmds.EncoderMap{
cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *filestore.ListRes) error {
if out.Status == filestore.StatusOtherError {
return fmt.Errorf(out.ErrorMsg)
fmt.Fprintf(os.Stderr, "%s\n", out.ErrorMsg)
Copy link
Contributor

@kevina kevina Oct 31, 2018

Choose a reason for hiding this comment

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

This might be okay. Although i think we need to use PostRun here. I created an issue for it n go-ipfs-cmds: ipfs/go-ipfs-cmds#133.

Blocking for now to until others weigh in.

Copy link
Contributor

Choose a reason for hiding this comment

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

@Stebalien confirmed in ipfs/go-ipfs-cmds#133 that we should be using PostRun here.

@Stebalien Stebalien mentioned this pull request Oct 31, 2018
73 tasks
@kevina
Copy link
Contributor

kevina commented Nov 5, 2018

@overbool do you want me to take over this commit and fix it to use PostRun?

@overbool
Copy link
Contributor Author

overbool commented Nov 6, 2018

@overbool do you want me to take over this commit and fix it to use PostRun?

Ok, thx.

Copy link
Contributor

@kevina kevina left a comment

Choose a reason for hiding this comment

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

One minor thing then LGTM.

if !ok {
return nil, e.TypeErr(r, v)
}
list := v.(*filestore.ListRes)
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be:

list, ok := v.(*filestore.ListRes)
if !ok {
  return nil, e.TypeErr(r, v)
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kevina I had changed it, thx

@kevina
Copy link
Contributor

kevina commented Nov 6, 2018

@overbool

Sorry. I didn't see that you already converted the command to use PostRun. One minor change then it LGTM.

Copy link
Contributor

@kevina kevina left a comment

Choose a reason for hiding this comment

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

LGTM

License: MIT
Signed-off-by: Overbool <overbool.xu@gmail.com>
License: MIT
Signed-off-by: Overbool <overbool.xu@gmail.com>
License: MIT
Signed-off-by: Overbool <overbool.xu@gmail.com>
License: MIT
Signed-off-by: Overbool <overbool.xu@gmail.com>
License: MIT
Signed-off-by: Overbool <overbool.xu@gmail.com>
@ghost ghost assigned Stebalien Nov 6, 2018
@ghost ghost added the status/in-progress In progress label Nov 6, 2018
@Stebalien Stebalien merged commit a8dd21a into ipfs:master Nov 6, 2018
@ghost ghost removed the status/in-progress In progress label Nov 6, 2018
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.

3 participants