Skip to content

fix: honor BoolWithInverseFlag DefaultText - #2403

Merged
dearchap merged 1 commit into
urfave:mainfrom
fzlzjerry:fix/2402-bool-inverse-default-text
Aug 15, 2026
Merged

fix: honor BoolWithInverseFlag DefaultText#2403
dearchap merged 1 commit into
urfave:mainfrom
fzlzjerry:fix/2402-bool-inverse-default-text

Conversation

@fzlzjerry

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • bug

What this PR does / why we need it:

  • Make BoolWithInverseFlag.GetDefaultText honor an explicitly configured DefaultText before falling back to the flag's boolean value.
  • Cover both the direct default-text behavior and the generated help output while preserving the existing true/false fallback.

Which issue(s) this PR fixes:

Fixes #2402

Testing

  • go test -race ./... -count=1
  • go vet ./...
  • make lint
  • make check-binary-size
  • make generate v3diff
  • make diffcheck

Release Notes

`BoolWithInverseFlag` now honors `DefaultText` in generated help output.

@fzlzjerry
fzlzjerry requested a review from a team as a code owner August 13, 2026 16:54
Copilot AI lite review requested due to automatic review settings August 13, 2026 16:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@dearchap
dearchap merged commit 4c19740 into urfave:main Aug 15, 2026
9 checks passed
@lsg551

lsg551 commented Aug 15, 2026

Copy link
Copy Markdown

thanks for the quick fix, appreciate that!

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.

BoolWithInverseFlag does not honor explicitly set DefaultText

5 participants