From 7e347972c4f3748157645f71acc3eb5193ab922b Mon Sep 17 00:00:00 2001 From: Roman Khavronenko Date: Mon, 13 Jul 2020 19:56:37 +0100 Subject: [PATCH] lib/flagutil: specify additional description for all Array type flags (#620) Array type flag is now defined as `value` type in flag description when printed. This change adds additional description to every Array type flag so it would be clear what exact type is used: ``` -remoteWrite.urlRelabelConfig array Optional path to relabel config for the corresponding -remoteWrite.url Supports array of values separated by comma or specified via multiple flags. ``` --- lib/flagutil/array.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/flagutil/array.go b/lib/flagutil/array.go index 231cf41c14..ebd81a20bb 100644 --- a/lib/flagutil/array.go +++ b/lib/flagutil/array.go @@ -10,6 +10,8 @@ import ( // NewArray returns new Array with the given name and description. func NewArray(name, description string) *Array { var a Array + description += "\nSupports `array` of values separated by comma" + + " or specified via multiple flags." flag.Var(&a, name, description) return &a }