From 346b4a27eac5645d421c74177efd40a5194792d1 Mon Sep 17 00:00:00 2001 From: Tamas Levai Date: Tue, 9 Jan 2024 13:41:18 +0100 Subject: [PATCH] fix(turncat): Hide pflag requested msg in `--help` --- cmd/turncat/main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/turncat/main.go b/cmd/turncat/main.go index 899b7e87..773daafb 100644 --- a/cmd/turncat/main.go +++ b/cmd/turncat/main.go @@ -43,8 +43,14 @@ func main() { // var passwd = flag.StringP("log", "l", "all:WARN", "Log level (default: all:WARN).") var insecure = flag.BoolP("insecure", "i", false, "Insecure TLS mode, accept self-signed certificates (default: false).") var verbose = flag.BoolP("verbose", "v", false, "Verbose logging, identical to -l all:DEBUG.") + var help = flag.BoolP("help", "h", false, "Display this help text and exit") flag.Parse() + if *help { + Usage() + os.Exit(0) + } + if flag.NArg() != 3 { Usage() os.Exit(1)