Add path, existingfile and existingdir types.
- Document custom types. - Add docker example.
This commit is contained in:
@@ -24,9 +24,13 @@ var cli struct {
|
||||
|
||||
func main() {
|
||||
cmd := kong.Parse(&cli, kong.Description("A shell-like example app."),
|
||||
kong.HelpOptions(kong.CompactHelp()))
|
||||
kong.UsageOnError(),
|
||||
kong.HelpOptions(kong.HelpPrinterOptions{
|
||||
Compact: true,
|
||||
Summary: true,
|
||||
}))
|
||||
switch cmd {
|
||||
case "rm <paths>":
|
||||
case "rm <path>":
|
||||
fmt.Println(cli.Rm.Paths, cli.Rm.Force, cli.Rm.Recursive)
|
||||
|
||||
case "ls":
|
||||
|
||||
Reference in New Issue
Block a user