Skip to content

Conversation

@harp-intel
Copy link
Contributor

This pull request updates the required flag validation for the trim command in cmd/metrics/trim.go. Instead of relying on Cobra's MarkFlagRequired, the code now explicitly checks if the --input flag was provided and returns a custom error if not.

Flag validation improvements:

  • Removed the use of trimCmd.MarkFlagRequired for the --input flag, eliminating reliance on Cobra's built-in required flag mechanism.
  • Added an explicit check in validateTrimFlags to ensure that the --input flag is provided, returning a custom error message if it is missing.

Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
@harp-intel harp-intel merged commit 5e0056b into main Jan 29, 2026
5 checks passed
@harp-intel harp-intel deleted the trim-input branch January 29, 2026 00:52
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.

2 participants