From 7fb1fcf21f2948859ca292ed47cd7dab531f2d80 Mon Sep 17 00:00:00 2001 From: Justin Harms Date: Tue, 2 Sep 2025 05:59:18 -0500 Subject: [PATCH] Remove unused thread configuration from root command and streamline initialization process - Eliminated the threads variable and its associated logic for setting maximum processing threads. - Simplified the command initialization by removing unnecessary flags related to thread management. --- cmd/root.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index c3ade30..d8ca81e 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -4,7 +4,6 @@ package cmd import ( "fmt" "os" - "runtime" "s1d3sw1ped/SteamCache2/config" "s1d3sw1ped/SteamCache2/steamcache" "s1d3sw1ped/SteamCache2/steamcache/logger" @@ -16,7 +15,6 @@ import ( ) var ( - threads int configPath string logLevel string @@ -96,13 +94,6 @@ var rootCmd = &cobra.Command{ Str("config_path", configPath). Msg("Configuration loaded successfully") - if runtime.GOMAXPROCS(-1) != threads { - runtime.GOMAXPROCS(threads) - logger.Logger.Info(). - Int("threads", threads). - Msg("Maximum number of threads set") - } - sc := steamcache.New( cfg.ListenAddress, cfg.Cache.Memory.Size, @@ -135,8 +126,6 @@ func Execute() { func init() { rootCmd.Flags().StringVarP(&configPath, "config", "c", "config.yaml", "Path to configuration file") - rootCmd.Flags().IntVarP(&threads, "threads", "t", runtime.GOMAXPROCS(-1), "Number of worker threads to use for processing requests") - rootCmd.Flags().StringVarP(&logLevel, "log-level", "l", "info", "Logging level: debug, info, error") rootCmd.Flags().StringVarP(&logFormat, "log-format", "f", "console", "Logging format: json, console") }