Skip to content

Commit

Permalink
note to self: don't redeclare h as a flag option to avoid obscure panics
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerwelin committed Oct 10, 2019
1 parent a374ae0 commit 548c505
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func runCLI(args []string) {
Destination: &promGwURL,
},
cli.StringFlag{
Name: "h, header",
Name: "H, header",
Usage: "Add Arbitrary header line, eg. 'Host: www.example.com'",
Destination: &httpHeader,
},
Expand Down Expand Up @@ -163,7 +163,7 @@ func runCLI(args []string) {
Destination: &promGwURL,
},
cli.StringFlag{
Name: "h, header",
Name: "H, header",
Usage: "Add Arbitrary header line, eg. 'Host: www.example.com'",
Destination: &httpHeader,
},
Expand All @@ -180,7 +180,7 @@ func runCLI(args []string) {
}
}

err := app.Run(os.Args)
err := app.Run(args)
if err != nil {
fmt.Println(err)
os.Exit(0)
Expand Down

0 comments on commit 548c505

Please sign in to comment.