feat: add request timeout

This commit is contained in:
2025-07-24 22:21:11 +02:00
parent 723aae48ce
commit 2abebfd01b
3 changed files with 11 additions and 4 deletions

View File

@ -34,6 +34,7 @@ func initRootCmd() {
rootCmd.PersistentFlags().StringVarP(&appConfig.OutputFormatter, "output", "o", "table", "Set output format")
rootCmd.PersistentFlags().BoolVar(&appConfig.OutputOrderReverse, "reverse", false, "Reverses output item order")
rootCmd.PersistentFlags().BoolVar(&appConfig.PrintConfig, "print-config", false, "Enable printing the application config")
rootCmd.PersistentFlags().UintVar(&appConfig.RequestTimeoutSeconds, "timeout", DefaultRequestTimeout, "Set the request timeout in seconds")
logger := jlog.New(slog.LevelDebug)
ctx := jlog.ContextWith(context.Background(), logger)