Skip to content

Conversation

@andreimerlescu
Copy link
Owner

The UsageString() was printing the aliases registered in the tree.flagSet, but they needed to be skipped. This skips the duplicate lines from the output and uses the concise format instead.

@Copilot Copilot AI review requested due to automatic review settings June 23, 2025 20:22
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 refines the output of the UsageString by deduplicating flag alias entries and using a more concise formatting style. Key changes include:

  • Gathering flag data into a new struct and deduplicating alias entries.
  • Replacing flag.VisitAll loops with map-based iterations and sorted output.
  • Adding a test to ensure the usage string output is non-empty and bumping the version.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
usage.go Refactors usage string generation to remove duplicate alias entries and improves alias formatting.
alias_test.go Adds test coverage for the updated UsageString output.
VERSION Bumps version from v2.0.11 to v2.0.12.

@andreimerlescu andreimerlescu merged commit 33b4d54 into main Jun 23, 2025
6 checks passed
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