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
As stated above, I am expecting the output of kingpin.MustParse(app.Parse(args)) to equal the result of .FullCommand() function of a command, rather than to have to define my own strings in the switch statement.
Below is an example block of test code that I would expect to passed.
I do not mind whether the parsed output is changed to "init [<file>]" or whether importCmd.FullCommand() returns "init", however I would like the test to pass.
Context
My reasons for using (v3 unstable) are that:
I want to be able to write apps where I can use the app.UsageContext to include examples in the usage context. I have written github.com/matthewdunsdon/egcmd and github.com/matthewdunsdon/egcmd/egkingpin to make this possible.
I have no intention to take the apps I write with (v3 unstable) into any production environment. I am using them for my own learning and own use.
When using kingpin, I was expecting to be able to write the following code to parse a command:
Given the CLI args
myapp init file.txt
, I got the usage message displayed, when I wanted initAction to be called.Currently in kingpin (v3 unstable) I am working around this issue using:
Expected Behavior
As stated above, I am expecting the output of
kingpin.MustParse(app.Parse(args))
to equal the result of.FullCommand()
function of a command, rather than to have to define my own strings in the switch statement.Below is an example block of test code that I would expect to passed.
Current Behavior
Test Output:
I do not mind whether the parsed output is changed to
"init [<file>]"
or whetherimportCmd.FullCommand()
returns"init"
, however I would like the test to pass.Context
My reasons for using (v3 unstable) are that:
app.UsageContext
to include examples in the usage context. I have writtengithub.com/matthewdunsdon/egcmd
andgithub.com/matthewdunsdon/egcmd/egkingpin
to make this possible.Environment
"gopkg.in/alecthomas/kingpin.v3-unstable"
1.8
> lsb_release -a LSB Version: 1.4 Distributor ID: Solus Description: Solus Release: 2017.04.18.0 Codename: shannon
The text was updated successfully, but these errors were encountered: