rename 'readArgs' to better describe variable replacement

This commit is contained in:
Baipyrus 2024-10-01 19:58:41 +02:00
parent 47cbfc4b8d
commit 7fb9456492

View File

@ -9,7 +9,7 @@ import (
"golang.org/x/sys/windows/registry" "golang.org/x/sys/windows/registry"
) )
func readArgs(replaceVariable bool, args []string, configCmd string) ([]string, string) { func processVars(replaceVariable bool, args []string, configCmd string) ([]string, string) {
var configArgs []string var configArgs []string
for _, arg := range args { for _, arg := range args {
@ -62,7 +62,7 @@ func generateCommands(variants []*util.Variant, configCmd, proxyServer string) [
for _, variant := range variants { for _, variant := range variants {
replaceVariable := variant.Type == util.VARIABLE replaceVariable := variant.Type == util.VARIABLE
configArgs, configCmd := readArgs(replaceVariable, variant.Arguments, configCmd) configArgs, configCmd := processVars(replaceVariable, variant.Arguments, configCmd)
configArgs, configCmd = applyProxy(configArgs, configCmd, proxyServer, variant) configArgs, configCmd = applyProxy(configArgs, configCmd, proxyServer, variant)
commands = append(commands, &util.Command{Name: configCmd, Arguments: configArgs}) commands = append(commands, &util.Command{Name: configCmd, Arguments: configArgs})