From 07b497d4169b7fa93fd03628cefe32cfaaaf7c00 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sat, 13 Oct 2018 22:40:58 +0800 Subject: [PATCH] fix: can combine chain of 2 appends into one --- plugin.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugin.go b/plugin.go index 70e53da..6252432 100644 --- a/plugin.go +++ b/plugin.go @@ -43,8 +43,7 @@ func pkValidate(config Config) *exec.Cmd { } for k, v := range config.Vars { - args = append(args, "-var") - args = append(args, fmt.Sprintf("%s=%s", k, v)) + args = append(args, "-var", fmt.Sprintf("%s=%s", k, v)) } if len(config.Except) > 0 { @@ -76,8 +75,7 @@ func pkBuild(config Config) *exec.Cmd { } for k, v := range config.Vars { - args = append(args, "-var") - args = append(args, fmt.Sprintf("%s=%s", k, v)) + args = append(args, "-var", fmt.Sprintf("%s=%s", k, v)) } if len(config.Except) > 0 {