Add TakesFile indicator to flag

This new member of `Flag` indicates if the flag expects a file as input.
This is especially useful for documentation and shell completion purposes.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
This commit is contained in:
Sascha Grunert
2019-08-09 09:05:55 +02:00
parent 2e0e39a03b
commit e9e9e0ac5d
4 changed files with 17 additions and 2 deletions

View File

@@ -17,6 +17,7 @@ type {{ $flag.Name }}Flag struct {
FilePath string
Required bool
Hidden bool
TakesFile bool
{{- if eq $flag.Value true }}
Value {{ $flag.Type }}
{{- end }}