urfave / cli

A simple, fast, and fun package for building command line apps in Go
https://cli.urfave.org
MIT License
21.91k stars 1.69k forks source link

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

Closed dearchap closed 3 days ago

dearchap commented 5 days ago

What type of PR is this?

(REQUIRED)

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. 
abitrolly commented 5 days ago

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

dearchap commented 4 days ago

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

Thats exactly why we need to mask it right ?

abitrolly commented 3 days ago

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 commented 3 days ago

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.