🔨 update CLIYesOrNoReader to include default value

This commit is contained in:
2024-09-03 02:05:50 +04:00
parent 86e4f74f10
commit b7ac3bc549
2 changed files with 21 additions and 3 deletions

View File

@@ -272,7 +272,9 @@ func getClientDoFunc(
}
activeProxyClientsCount := len(activeProxyClients)
var yesOrNoMessage string
var yesOrNoDefault bool
if activeProxyClientsCount == 0 {
yesOrNoDefault = false
yesOrNoMessage = utils.Colored(
utils.Colors.Red,
"No active proxies found. Do you want to continue?",
@@ -287,7 +289,7 @@ func getClientDoFunc(
)
}
fmt.Println()
proceed := readers.CLIYesOrNoReader(yesOrNoMessage)
proceed := readers.CLIYesOrNoReader(yesOrNoMessage, yesOrNoDefault)
if !proceed {
utils.PrintAndExit("Exiting...")
}