From 31e0fa5ea40824228e1a063c2bfd640897159fd1 Mon Sep 17 00:00:00 2001 From: "Arik Jones (aider)" Date: Sun, 22 Sep 2024 17:07:57 -0500 Subject: [PATCH] fix: Remove redeclaration of `cfg` variable in `cmd/root.go` --- cmd/root.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index 8a514e0..43f2890 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -7,7 +7,6 @@ import ( var ( configFile string - cfg *config.Config verbose bool ) @@ -19,10 +18,10 @@ Use subcommands to perform specific operations.`, } func Execute(conf *config.Config) error { - cfg = conf - if cfg == nil { - cfg = &config.Config{} // Use an empty config if none is provided + if conf == nil { + conf = &config.Config{} // Use an empty config if none is provided } + cfg = conf // Set the cfg variable in cmd/files.go return rootCmd.Execute() }