refactor: simplify codebase (-209 lines)

This commit is contained in:
Mathis Maquenne
2026-03-01 21:55:42 +01:00
parent cd45c3f40a
commit 08b608ec80
31 changed files with 389 additions and 598 deletions
+3 -7
View File
@@ -17,15 +17,11 @@ var watchRunCmd = &cobra.Command{
if err != nil {
return
}
cmd.SetContext(context.WithValue(cmd.Context(), "appConfig", appConfig))
cmd.SetContext(context.WithValue(cmd.Context(), appConfigKey, appConfig))
},
Run: func(cmd *cobra.Command, args []string) {
ctx := cmd.Context()
appConfigVal := ctx.Value("appConfig")
appConfig, _ := appConfigVal.(*config.Config)
w := watcher.New(appConfig)
w.Run(ctx, opts)
appConfig, _ := cmd.Context().Value(appConfigKey).(*config.Config)
watcher.New(appConfig).Run(cmd.Context(), opts)
},
}