[RFC] main: print pretty json manifest#414
Conversation
This commit makes us json pretty the osbuild manifests. This means that when `image-builder manifest` or `image-builder build --with-manifest` is used we get a nice representation of the manifest (and it has no consequences otherwise except for a few more bytes in memory for the extra whitespace). Given that people who ask for a manifest often want to inspect it seems nice to make it pretty by default. OTOH there is jq - so if its considered fluff that is fine too :)
|
Love it but here is an idea. Interactive terminal? Pretty print. In other cases (pipe or redirect) do ugly output. We already have a helper for that for the progress bar, you could re-use it. |
lzap
left a comment
There was a problem hiding this comment.
I mean this is better than before sure, no need to make it too complex. I would go for two spaces myself but you are the inventor here :-)
Haha - I absolutely do not mind, I just copied the json.Ident() from the upstream docs, if you prefer 2 instead of 4 I will gladly change it, just say the word! |
As you already have figured out, I am very, very rarely making someone else change their code. I only offer other view and if they do not fall in love in these (often crazy) ideas, that is fine :-) Let's do it. Thanks. |
This commit makes the json pretty when
image-builder manifestis used. Given that this is most likley something that our users run to actually see the manifest we should make it pretty by default.