add inserting comma inside value instruction to flag description (#5666)

This commit is contained in:
Hui Wang 2024-01-27 05:46:49 +08:00 committed by Aliaksandr Valialkin
parent 9e9f170fe7
commit f579adf05f
No known key found for this signature in database
GPG Key ID: 52C003EE2BCDB9EB

View File

@ -11,6 +11,7 @@ import (
// NewArrayString returns new ArrayString with the given name and description. // NewArrayString returns new ArrayString with the given name and description.
func NewArrayString(name, description string) *ArrayString { func NewArrayString(name, description string) *ArrayString {
description += "\nSupports an `array` of values separated by comma or specified via multiple flags." description += "\nSupports an `array` of values separated by comma or specified via multiple flags."
description += "\nValue can contain comma inside single-quoted or double-quoted string, {}, [] and () braces."
var a ArrayString var a ArrayString
flag.Var(&a, name, description) flag.Var(&a, name, description)
return &a return &a