Correctly check for required positionals.

This commit is contained in:
Alec Thomas
2018-06-20 22:36:33 +10:00
parent 653531d6bc
commit 4edc701d63
2 changed files with 39 additions and 26 deletions
+4
View File
@@ -1,6 +1,8 @@
package main
import (
"fmt"
"github.com/alecthomas/kong"
)
@@ -24,6 +26,8 @@ func main() {
cmd := kong.Parse(&cli, kong.Description("A shell-like example app."), kong.HelpOptions(kong.CompactHelp()))
switch cmd {
case "rm":
fmt.Println(cli.Rm.Paths, cli.Rm.Force)
case "ls":
}
}