From 048cb68898347dd1d04d2427007c453795d54c15 Mon Sep 17 00:00:00 2001 From: Aykhan Shahsuvarov Date: Wed, 18 Dec 2024 23:47:24 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=20Replace=20'math.MaxUint32'=20wit?= =?UTF-8?q?h=20static=20variable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- readers/cli.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/readers/cli.go b/readers/cli.go index 2b0db66..19e8b56 100644 --- a/readers/cli.go +++ b/readers/cli.go @@ -3,7 +3,6 @@ package readers import ( "flag" "fmt" - "math" "strings" "github.com/aykhans/dodo/config" @@ -113,9 +112,10 @@ func CLIConfigReader() (*config.CLIConfig, error) { case "requests-count", "r": cliConfig.RequestCount = requestsCount case "timeout", "t": - if timeout > math.MaxUint32 { - utils.PrintfC(utils.Colors.Yellow, "timeout value is too large, setting to %d\n", math.MaxUint32) - timeout = math.MaxUint32 + var maxUint32 uint = 4294967295 + if timeout > maxUint32 { + utils.PrintfC(utils.Colors.Yellow, "timeout value is too large, setting to %d\n", maxUint32) + timeout = maxUint32 } cliConfig.Timeout = uint32(timeout) case "no-proxy-check":