From 548c505f8ef347a3c46167c0d14bc4e4f4e1d662 Mon Sep 17 00:00:00 2001 From: rogerwelin Date: Fri, 11 Oct 2019 00:31:53 +0200 Subject: [PATCH] note to self: don't redeclare h as a flag option to avoid obscure panics --- cli.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cli.go b/cli.go index 0214863..63c7fb9 100644 --- a/cli.go +++ b/cli.go @@ -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, }, @@ -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, }, @@ -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)