justinmclean commented on PR #6198:
URL: https://github.com/apache/gravitino/pull/6198#issuecomment-2591209687
I think one small improvement would be to add this to the base class:
```
protected void optionalOutput(String message) {
if (!quiet) {
System.out.println(message);
}
}
```
and call optionalOutput in commands to remove the multiple `if (quiet)
return;` lines. This gives more flexibility in the future regarding the control
of the output.
Another solution to avoid passing quiet around (and changing so many files)
would involve creating a global config singleton, but that has its own issues
and I think is to be best avoided. We could also pass around a command context
(same no of files changed, but less changes would be required for future
similar changes) or as suggested above grouping different options into classes.
I would suggest doing that as a separate PR for this, as the saying goes "Make
it work, then make it good."
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]