From 9cafe2a9d5388e60a08b453a97f417a2323ba0c1 Mon Sep 17 00:00:00 2001 From: yupeng Date: Tue, 8 Nov 2016 14:51:17 +0800 Subject: [PATCH] context.Context should be the first parameter of a function Signed-off-by: yupeng Upstream-commit: 4b86bd050b6e4c944407680d99c9ce6f25b8cc53 Component: engine --- components/engine/cli/command/container/start.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/engine/cli/command/container/start.go b/components/engine/cli/command/container/start.go index 87e815fed5..77bb9ddb93 100644 --- a/components/engine/cli/command/container/start.go +++ b/components/engine/cli/command/container/start.go @@ -155,13 +155,13 @@ func runStart(dockerCli *command.DockerCli, opts *startOptions) error { } else { // We're not going to attach to anything. // Start as many containers as we want. - return startContainersWithoutAttachments(dockerCli, ctx, opts.containers) + return startContainersWithoutAttachments(ctx, dockerCli, opts.containers) } return nil } -func startContainersWithoutAttachments(dockerCli *command.DockerCli, ctx context.Context, containers []string) error { +func startContainersWithoutAttachments(ctx context.Context, dockerCli *command.DockerCli, containers []string) error { var failedContainers []string for _, container := range containers { if err := dockerCli.Client().ContainerStart(ctx, container, types.ContainerStartOptions{}); err != nil {