mirror of
https://github.com/aykhans/dodo.git
synced 2025-04-24 20:33:06 +00:00
🚑 Replace 'math.MaxUint32' with static variable
This commit is contained in:
parent
fd5e87ee68
commit
048cb68898
@ -3,7 +3,6 @@ package readers
|
|||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"math"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/aykhans/dodo/config"
|
"github.com/aykhans/dodo/config"
|
||||||
@ -113,9 +112,10 @@ func CLIConfigReader() (*config.CLIConfig, error) {
|
|||||||
case "requests-count", "r":
|
case "requests-count", "r":
|
||||||
cliConfig.RequestCount = requestsCount
|
cliConfig.RequestCount = requestsCount
|
||||||
case "timeout", "t":
|
case "timeout", "t":
|
||||||
if timeout > math.MaxUint32 {
|
var maxUint32 uint = 4294967295
|
||||||
utils.PrintfC(utils.Colors.Yellow, "timeout value is too large, setting to %d\n", math.MaxUint32)
|
if timeout > maxUint32 {
|
||||||
timeout = math.MaxUint32
|
utils.PrintfC(utils.Colors.Yellow, "timeout value is too large, setting to %d\n", maxUint32)
|
||||||
|
timeout = maxUint32
|
||||||
}
|
}
|
||||||
cliConfig.Timeout = uint32(timeout)
|
cliConfig.Timeout = uint32(timeout)
|
||||||
case "no-proxy-check":
|
case "no-proxy-check":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user