Skip to content

Conversation

@harp-intel
Copy link
Contributor

…emetry, and targets commands

…emetry, and targets commands

Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
@harp-intel harp-intel requested a review from Copilot December 17, 2025 19:36
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors flag name constants to improve code consistency and reusability across multiple commands. The changes make flag name constants publicly accessible from the internal/common package, enabling their use in command validation and flag handling throughout the codebase.

Key changes:

  • Exported target-related flag name constants in internal/common/targets.go by capitalizing them (e.g., flagTargetHostNameFlagTargetHostName)
  • Added new exported constants for root command flags in internal/common/common.go (e.g., FlagDebugName, FlagOutputDirName)
  • Updated all references across benchmark, restore, root, and telemetry commands to use the new exported constants

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
internal/common/targets.go Exported target flag name constants and updated all internal references
internal/common/common.go Added new exported constants for root command flags
cmd/telemetry/telemetry.go Simplified flag validation by using Lookup().Changed instead of retrieving flag values
cmd/root.go Removed local flag name constants and updated to use exported constants from common package
cmd/config/restore.go Updated flag name references to use exported constants from common package
cmd/benchmark/benchmark.go Updated flag name references to use exported constants from common package

@harp-intel harp-intel merged commit 2dea050 into main Dec 17, 2025
5 checks passed
@harp-intel harp-intel deleted the stringconst branch December 17, 2025 20:20
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