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

Add stdout support for meas command #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ubombar
Copy link
Collaborator

@ubombar ubombar commented Feb 15, 2025

Description

This PR adds support for the -o / --stdout flag in the meas subcommand. While the flag was previously implemented, its functionality was missing. This update ensures that the output can be written directly to stdout.

Changes

  • Added a boolean variable useStandardOut to the function getMeasMdFile for determining where to output the result.
  • When useStandardOut is true, the function prints the JSON output to os.Stdout.
  • The function now returns "" (empry string) instead of a filename when the flag is set and an error occurs.

Testing

  • Manually tested the new functionality by running commands and verifying output behavior.
  • No issues were observed during manual testing.
  • Unit tests are not yet implemented but should be added in the future.

Backward Compatibility

  • These changes are non-breaking and do not affect existing functionality.

@ubombar ubombar requested a review from SaiedKazemi February 15, 2025 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant