Deduplicate initDatabase, move to initConfig in Rootcmd

This commit is contained in:
Martin (Schretzi) Fuchsluger
2025-02-08 19:15:10 +01:00
parent 2082bac4fa
commit f1326734e5
12 changed files with 35 additions and 105 deletions
-7
View File
@@ -45,11 +45,4 @@ var projectCmd = &cobra.Command{
func init() {
rootCmd.AddCommand(projectCmd)
projectCmd.Flags().StringVarP(&projectColor, "color", "c", "", "Set the color of the project (hex code, e.g. #121212)")
var err error
database, err = InitDatabase()
if err != nil {
fmt.Printf("%s %+v\n", CharError, err)
os.Exit(1)
}
}