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

Add TakesFile indicator to flag #851

Merged
merged 2 commits into from Aug 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.