From 5dc38349195b5dcd7c17e91cb919fcbd3150b26e Mon Sep 17 00:00:00 2001 From: HilkopterBob Date: Fri, 4 Oct 2024 15:29:52 +0200 Subject: [PATCH] ref: move initConfig away from cobra Init. queue --- main.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/main.go b/main.go index 503f58e..05d801b 100644 --- a/main.go +++ b/main.go @@ -111,15 +111,13 @@ func init() { rootCmd.AddCommand(restartCmd) rootCmd.AddCommand(stopCmd) - // Initialize Viper config - cobra.OnInitialize(initConfig) + initConfig() err := db.InitDB() if err != nil { // FIXME: error Handling // FIXME: LOGGING! panic(err) } - pp.Println() } // generate admin for login and Setup