optiopay / klar

Integration of Clair and Docker Registry
MIT License
506 stars 140 forks source link

Added table formatting to output #128

Closed nabadger closed 5 years ago

nabadger commented 5 years ago

Adds table formatting to output - see #125

jeff-knurek commented 5 years ago

once I got Klar working, my first thought was to improve the output.

If you don't mind @nabadger, I'll send a PR to nabadger:prettify_output where I pull out the formatting from the main function, so that we can keep the default, and then expand/improve more formats in the future

nabadger commented 5 years ago

@jeff-knurek sounds good

nabadger commented 5 years ago

@hashmap this is good to review again. There's a nice change from @jeff-knurek which means this is no longer a breaking change (in terms of output), and it cleans up some of the code structure of how output is formatted.

Usage would now be something like:

FORMAT_OUTPUT=<standard|table|json> CLAIR_ADDR=localhost ./klar ...

but also supports existing usage:

JSON_OUTPUT=1 CLAIR_ADDR=localhost ./klar ...

Eventually we could deprecate JSON_OUTPUT in favour of FORMAT_OUTPUT

hashmap commented 5 years ago

Great work, thanks!