From af0c3da02a0af96451d6488e3fa7805a586d8d83 Mon Sep 17 00:00:00 2001 From: itchyny Date: Sat, 16 Nov 2024 23:33:27 +0900 Subject: [PATCH] use strings.Repeat to repeat a space in formatting flags --- cli/flags.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/flags.go b/cli/flags.go index fb3e34e1..17441b5b 100644 --- a/cli/flags.go +++ b/cli/flags.go @@ -203,7 +203,7 @@ func formatFlags(opts any) string { } else { sb.WriteString("=") } - sb.WriteString(" "[:24-sb.Len()+m]) + sb.WriteString(strings.Repeat(" ", 24-(sb.Len()-m))) sb.WriteString(tag.Get("description")) sb.WriteString("\n") }