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

feat: Empty json output to array #46

Merged
merged 2 commits into from Oct 21, 2020
Merged

feat: Empty json output to array #46

merged 2 commits into from Oct 21, 2020

Conversation

stepanstipl
Copy link
Contributor

This PR makes an empty output (i.e. no issues found) in json format to be an empty array (instead of null). This is more friendly for CI use (#31), such as with jq.

Before:

$./bin/kubent-darwin-amd64 -o json                                                                                                                       2
2:36PM INF >>> Kube No Trouble `kubent` <<<
...
...
null

After:

$./bin/kubent-darwin-amd64 -o json                                                                                                                     130
3:09PM INF >>> Kube No Trouble `kubent` <<<
...
...
[]

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

LGTM

@stepanstipl stepanstipl merged commit 45227c2 into master Oct 21, 2020
@stepanstipl stepanstipl deleted the json-ci-friendly branch October 21, 2020 16:54
@stepanstipl stepanstipl added the feature New feature or request label Nov 11, 2020
@stepanstipl stepanstipl changed the title Empty json output to array feat: Empty json output to array Dec 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant