From 3eb44daa51989fc639a1021fd557d1fbd7bf2d9e Mon Sep 17 00:00:00 2001 From: Knut Ahlers <knut@ahlers.me> Date: Tue, 20 Feb 2018 21:36:03 +0100 Subject: [PATCH] Fix variable shadowing Signed-off-by: Knut Ahlers <knut@ahlers.me> --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index b4cab76..9c380ce 100644 --- a/main.go +++ b/main.go @@ -40,8 +40,7 @@ var ( ) func init() { - var err error - if err = rconfig.Parse(&cfg); err != nil { + if err := rconfig.Parse(&cfg); err != nil { log.WithError(err).Fatal("Unable to parse commandline options") } @@ -56,6 +55,7 @@ func init() { os.Exit(0) } + var err error if cfg.Config, err = homedir.Expand(cfg.Config); err != nil { log.WithError(err).Fatal("Unable to expand config path") }