From d423d73251f63f428cdaf3fe2f5c0499e2aef5f1 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Thu, 8 Oct 2020 13:34:48 +0300 Subject: [PATCH] app/vmalert: do not pring description for all the flags on config errors The description is too big to consume by human and it just distracts humans. --- app/vmalert/datasource/init.go | 1 - app/vmalert/notifier/init.go | 1 - 2 files changed, 2 deletions(-) diff --git a/app/vmalert/datasource/init.go b/app/vmalert/datasource/init.go index 62e7848eb..6658e3d28 100644 --- a/app/vmalert/datasource/init.go +++ b/app/vmalert/datasource/init.go @@ -31,7 +31,6 @@ var ( // Init creates a Querier from provided flag values. func Init() (Querier, error) { if *addr == "" { - flag.PrintDefaults() return nil, fmt.Errorf("datasource.url is empty") } tr, err := utils.Transport(*addr, *tlsCertFile, *tlsKeyFile, *tlsCAFile, *tlsServerName, *tlsInsecureSkipVerify) diff --git a/app/vmalert/notifier/init.go b/app/vmalert/notifier/init.go index e1f100a51..35aaae5ab 100644 --- a/app/vmalert/notifier/init.go +++ b/app/vmalert/notifier/init.go @@ -26,7 +26,6 @@ var ( // Init creates a Notifier object based on provided flags. func Init(gen AlertURLGenerator) ([]Notifier, error) { if len(*addrs) == 0 { - flag.PrintDefaults() return nil, fmt.Errorf("at least one `-notifier.url` must be set") }