From 7c81f9b772c91438e0715c7fec6ab460a7dcc4fa Mon Sep 17 00:00:00 2001 From: elij Date: Sun, 12 Nov 2023 14:57:25 -0800 Subject: [PATCH] fix for counter type not rendering as INT closes #367 --- help.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/help.go b/help.go index 4fb7700..cf5a912 100644 --- a/help.go +++ b/help.go @@ -490,6 +490,7 @@ func formatFlag(haveShort bool, flag *Flag) string { flagString := "" name := flag.Name isBool := flag.IsBool() + isCounter := flag.IsCounter() if flag.Short != 0 { if isBool && flag.Tag.Negatable { flagString += fmt.Sprintf("-%c, --[no-]%s", flag.Short, name) @@ -511,7 +512,7 @@ func formatFlag(haveShort bool, flag *Flag) string { } } } - if !isBool { + if !isBool && !isCounter { flagString += fmt.Sprintf("=%s", flag.FormatPlaceHolder()) } return flagString