app/vmagent: check for error returned from flag.Set

This commit is contained in:
Aliaksandr Valialkin 2020-05-21 16:30:41 +03:00
parent f9847352b4
commit 8905bc2a40

View File

@ -59,7 +59,9 @@ func main() {
logger.Init()
if *dryRun {
flag.Set("promscrape.config.strictParse", "true")
if err := flag.Set("promscrape.config.strictParse", "true"); err != nil {
logger.Panicf("BUG: cannot set promscrape.config.strictParse=true: %s", err)
}
if err := remotewrite.CheckRelabelConfigs(); err != nil {
logger.Fatalf("error when checking relabel configs: %s", err)
}