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

Fix:(issue_1925) Dont print default text for required flags #1935

Merged
merged 3 commits into from
Jun 29, 2024

Conversation

dearchap
Copy link
Contributor

What type of PR is this?

(REQUIRED)

  • bug

What this PR does / why we need it:

(REQUIRED)

Which issue(s) this PR fixes:

(REQUIRED)

Fixes #1925

Special notes for your reviewer:

(fill-in or delete this section)

Testing

(fill-in or delete this section)

go test -run=ExampleCommand_Run_appHelp

Release Notes

(REQUIRED)

Required flags will not have default text printed. 

@dearchap dearchap requested a review from a team as a code owner June 28, 2024 01:56
flag.go Outdated Show resolved Hide resolved
flag.go Show resolved Hide resolved
flag.go Show resolved Hide resolved
@abitrolly
Copy link
Contributor

abitrolly commented Jun 28, 2024

The default value for required flag doesn't make sense. Why mask it?

Co-authored-by: ccoVeille <[email protected]>
@dearchap
Copy link
Contributor Author

The default value for required flag doesn't make sense. Why mask it?

Thats exactly why we need to mask it right ?

@abitrolly
Copy link
Contributor

The default value for required flag doesn't make sense. Why mask it?

Thats exactly why we need to mask it right ?

Maybe fail with an error then?

@dearchap
Copy link
Contributor Author

The default value for required flag doesn't make sense. Why mask it?

Thats exactly why we need to mask it right ?

Maybe fail with an error then?

The default value for required flag doesn't make sense. Why mask it?

Thats exactly why we need to mask it right ?

Maybe fail with an error then?

This is to do with display and not the behavior of the flag itself.

@dearchap dearchap merged commit df46df5 into urfave:main Jun 29, 2024
13 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.

Allow omission of default text in help text
4 participants