cli: fix usage format when multiple env vars are set

Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
Adphi 2024-07-11 14:10:07 +02:00
parent 198bd2bd59
commit fd51ed5961
Signed by: adphi
GPG Key ID: 46BE4062DB2397FF

View File

@ -129,7 +129,7 @@ func Command(obj Runnable, c *cobra.Command) *cobra.Command {
if v == "" { if v == "" {
continue continue
} }
usage += fmt.Sprintf("%s [$%s]", usage, v) usage += fmt.Sprintf(" [$%s]", v)
} }
defInt, err := strconv.Atoi(defValue) defInt, err := strconv.Atoi(defValue)
if err != nil { if err != nil {