jessevdk / go-flags

go command line option parser
http://godoc.org/github.com/jessevdk/go-flags
BSD 3-Clause "New" or "Revised" License
2.56k stars 305 forks source link

Allow to specify default value for a positional argument #373

Open anatol opened 2 years ago

anatol commented 2 years ago

I have a positional argument

Args struct {
    Output string `positional-arg-name:"output" default:"foo.txt"`
} `positional-args:"true"`

And default tag does not seem to work for it. It would be useful to allow to specify such default value.