chore: slice replace loop (#2757)

Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
This commit is contained in:
guangwu
2023-07-13 23:13:47 +10:00
committed by GitHub
parent 22cfcbd5a1
commit 150dac9ead
3 changed files with 3 additions and 9 deletions
+1 -3
View File
@@ -47,9 +47,7 @@ func (c *Command) Stderr() string {
}
func (c *Command) AddArgs(args []string) {
for _, arg := range args {
c.args = append(c.args, arg)
}
c.args = append(c.args, args...)
}
// CreateCommand returns a *Cmd struct that when run, will run the given command + args in the given directory