Skip to content

Comments

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

Merged
dearchap merged 3 commits intourfave:mainfrom
dearchap:issue_1925
Jun 29, 2024
Merged

Fix:(issue_1925) Dont print default text for required flags#1935
dearchap merged 3 commits intourfave:mainfrom
dearchap:issue_1925

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
@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 <3875889+ccoVeille@users.noreply.github.com>
@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
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