Skip to content

Commit af0c3da

Browse files
committed
use strings.Repeat to repeat a space in formatting flags
1 parent 8a09826 commit af0c3da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cli/flags.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ func formatFlags(opts any) string {
203203
} else {
204204
sb.WriteString("=")
205205
}
206-
sb.WriteString(" "[:24-sb.Len()+m])
206+
sb.WriteString(strings.Repeat(" ", 24-(sb.Len()-m)))
207207
sb.WriteString(tag.Get("description"))
208208
sb.WriteString("\n")
209209
}

0 commit comments

Comments
 (0)