Skip to content

Commit

Permalink
Replace loop with unpacking
Browse files Browse the repository at this point in the history
  • Loading branch information
johejo committed Dec 1, 2020
1 parent 030cc65 commit 3136567
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions shellwords.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,7 @@ loop:
if err != nil {
return nil, err
}
for _, str := range strs {
args = append(args, str)
}
args = append(args, strs...)
} else {
args = append(args, replaceEnv(p.Getenv, buf))
}
Expand Down Expand Up @@ -267,9 +265,7 @@ loop:
if err != nil {
return nil, err
}
for _, str := range strs {
args = append(args, str)
}
args = append(args, strs...)
} else {
args = append(args, replaceEnv(p.Getenv, buf))
}
Expand Down

0 comments on commit 3136567

Please sign in to comment.