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

Fix and honor --json flag for find command. #2263

Merged
merged 1 commit into from
Oct 3, 2017

Conversation

harshavardhana
Copy link
Member

Currently mc find didn't honor --json flag properly,
this PR addresses that.

Additionally also take care of List returning errors
and handle them appropriately.

Fixes #2252

@codecov-io
Copy link

codecov-io commented Sep 27, 2017

Codecov Report

Merging #2263 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2263      +/-   ##
=========================================
- Coverage    9.08%   9.07%   -0.01%     
=========================================
  Files         100     100              
  Lines        9598    9607       +9     
=========================================
  Hits          872     872              
- Misses       8595    8604       +9     
  Partials      131     131
Impacted Files Coverage Δ
cmd/find.go 1.72% <0%> (-0.05%) ⬇️
cmd/find-main.go 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 07e810f...d60194e. Read the comment docs.

Copy link
Member

@vadmeste vadmeste left a comment

Choose a reason for hiding this comment

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

LGTM & tested

stage/
mc
Copy link
Member

Choose a reason for hiding this comment

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

make ending with newline

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

@@ -43,21 +42,17 @@ import (

// findMSG holds JSON and string values for printing
type findMSG struct {
Copy link
Member

Choose a reason for hiding this comment

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

I think you have a consistent name like findMessage

Copy link
Member Author

Choose a reason for hiding this comment

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

Not part of this PR. Needs a cleanup in separate PR.

Copy link
Member

Choose a reason for hiding this comment

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

ok fine

Currently `mc find` didn't honor `--json` flag properly,
this PR addresses that.

Additionally also take care of `List` returning errors
and handle them appropriately.

Fixes minio#2252
@deekoder deekoder merged commit 37e5a78 into minio:master Oct 3, 2017
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.

5 participants