You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I am looking for a future to parse docopt even if no args were given for parser.
Real use-case - I want to get all flags (by flag I mean all options a command can receive) and use them in autocomplete.
Basically I need only keys from opts map[string]interface{} map of flags. I then filter them as I need.
Example:
doc=`Usage: somecli run [--debug] [--config=<config>] <app>Options: --debug Run app with debug --config=<config> Run with a config file <app> An app to run`onlyFlage:=trueopts, err:=docopt.ParseDoc(doc, onlyFlags)
The values of flags doesn't matter in this case and can be default values (bool, empty string, nil, etc)
I am ready to implement this feature if you are okay with an idea.
Thanks!
The text was updated successfully, but these errors were encountered:
Hi. I am looking for a future to parse docopt even if no args were given for parser.
Real use-case - I want to get all flags (by flag I mean all options a command can receive) and use them in autocomplete.
Basically I need only keys from opts
map[string]interface{}
map of flags. I then filter them as I need.Example:
The values of flags doesn't matter in this case and can be default values (bool, empty string, nil, etc)
I am ready to implement this feature if you are okay with an idea.
Thanks!
The text was updated successfully, but these errors were encountered: