mirror of
https://github.com/Baipyrus/ProxySwitcher.git
synced 2024-12-26 12:41:45 +00:00
rename 'readArgs' to better describe variable replacement
This commit is contained in:
parent
47cbfc4b8d
commit
7fb9456492
@ -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})
|
||||||
|
Loading…
Reference in New Issue
Block a user