Skip to content

Commit

Permalink
feat: show help on invalid command
Browse files Browse the repository at this point in the history
  • Loading branch information
chetan committed Dec 16, 2020
1 parent b7c06d4 commit df6cf19
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bin/vproxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ func parseFlags() {
Usage: "zero-config virtual proxies with tls",
Version: version,

CommandNotFound: func(c *cli.Context, cmd string) {
fmt.Printf("error: unknown command '%s'\n\n", cmd)
cli.ShowAppHelpAndExit(c, 1)
},

Flags: []cli.Flag{
&cli.StringFlag{
Name: "config",
Expand Down

0 comments on commit df6cf19

Please sign in to comment.