Open joaopapereira opened 1 month ago
I haven't reviewed this PR in detail, but a couple quick thoughts:
-v
flag or the environment-variable-based configuration.--output=json
instead of --json
(inspired by AWS CLI)?
- Is there a way we can handle this flag globally, rather than needing to implement it as a flag for every command? Similar to the
-v
flag or the environment-variable-based configuration.
That was my first attempt but even when you look at the apps command you can see that the output is split into 3 different calls to the UI Writer, which makes it complicated to abstract out. Another thing that I noticed is that in some cases changing the name of the keys, in the struct they are called "Name" but in the output we set it to "SpaceName" we also do translations which complicates even further the code.
- What about --output=json instead of --json (inspired by AWS CLI)?
I do not have a strong opinion about that, are we planning on adding TOML or YAML support, or are we just covering our basis here?
Description of the Change
This change adds the
--json
flags to the commandsapps
,app
, andget-health-check
commands as a PoC for us to understand how complicated this would be.