From eba5ffe81557ad86135da0e8e82e22b33a2bd9fd Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Fri, 28 Sep 2018 23:49:40 +0200 Subject: [PATCH] Support configuration through ENV vars Signed-off-by: Knut Ahlers --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 76d5275..cce6df8 100644 --- a/main.go +++ b/main.go @@ -37,7 +37,8 @@ var ( ) func init() { - if err := rconfig.Parse(&cfg); err != nil { + rconfig.AutoEnv(true) + if err := rconfig.ParseAndValidate(&cfg); err != nil { log.Fatalf("Unable to parse CLI parameters: %s", err) }