Skip to content

Commit

Permalink
Merge pull request #851 from saschagrunert/takes-file
Browse files Browse the repository at this point in the history
Add `TakesFile` indicator to flag
  • Loading branch information
asahasrabuddhe committed Aug 10, 2019
2 parents 7058c58 + c6c2008 commit 8b18c71
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flag-gen/assets_vfsdata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions flag-gen/main.go
Expand Up @@ -28,6 +28,7 @@ type FlagType struct {
Parser string `json:"parser"`
ParserCast string `json:"parser_cast"`
ValueString string `json:"valueString"`
TakesFile bool `json:"takes_file"`
}

func main() {
Expand Down
1 change: 1 addition & 0 deletions flag-gen/templates/cli_flags_generated.gotpl
Expand Up @@ -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 }}
Expand Down
13 changes: 13 additions & 0 deletions flag_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8b18c71

Please sign in to comment.