Skip to content

Commit

Permalink
optimization for getTasks method
Browse files Browse the repository at this point in the history
  • Loading branch information
saromanov committed Mar 16, 2019
1 parent 3454fe3 commit 2916063
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions cmd/tubectl/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,9 @@ func getTasks(
params *Params,
resources []Resource,
) []Task {
tasks := []Task{}

for _, resource := range resources {
tasks = append(
tasks,
getTask(ctlPath, params, resource),
)
tasks := make([]Task, len(resources))
for i, resource := range resources {
tasks[i] = getTask(ctlPath, params, resource)
}

return tasks
Expand Down

0 comments on commit 2916063

Please sign in to comment.