From 9eb5982bb7a55fb45b2155e1c424be77427a4ca0 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Tue, 1 Oct 2024 20:00:31 +0200 Subject: [PATCH] rename 'isVariableType' to standardized boolean meaning of variable --- proxy/util.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/proxy/util.go b/proxy/util.go index c959b29..3569977 100644 --- a/proxy/util.go +++ b/proxy/util.go @@ -9,12 +9,12 @@ import ( "golang.org/x/sys/windows/registry" ) -func processVars(replaceVariable bool, args []string, configCmd string) ([]string, string) { +func processVars(isVariableType bool, args []string, configCmd string) ([]string, string) { var configArgs []string for _, arg := range args { // If not replacable, append - if !replaceVariable { + if !isVariableType { configArgs = append(configArgs, arg) continue } @@ -60,9 +60,9 @@ func generateCommands(variants []*util.Variant, configCmd, proxyServer string) [ // Generate one command per variant for _, variant := range variants { - replaceVariable := variant.Type == util.VARIABLE + isVariableType := variant.Type == util.VARIABLE - configArgs, configCmd := processVars(replaceVariable, variant.Arguments, configCmd) + configArgs, configCmd := processVars(isVariableType, variant.Arguments, configCmd) configArgs, configCmd = injectProxy(configArgs, configCmd, proxyServer, variant) commands = append(commands, &util.Command{Name: configCmd, Arguments: configArgs})