-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Example:
package main
import (
"fmt"
"github.com/leaanthony/clir"
)
func main() {
cli := clir.NewCli("test", "Test", "v0.0.0")
s := cli.NewSubCommand("sub", "Desc")
var f string
s.StringFlag("f", "De", &f)
s.Action(func() error {
fmt.Println(f)
return nil
})
cli.Run()
}
Command
go run main.go sub file -help
Expected output
test v0.0.0 - Test
test sub - Desc
Flags:
-f string
De
-help
Get help on the 'test sub' command.
Actual output
Update
It seems that if the additional argument is provided after the flags it just works fine. However I don't consider this a viable solution. Now I can see some parallels to #9.
I am going to address this in a PR.
pepa65 and KyleKing
Metadata
Metadata
Assignees
Labels
No labels