(ctx context.Context, dockerCli command.Cli, backendOptions *BackendOptions, opts startOptions, services []string)
| 52 | } |
| 53 | |
| 54 | func runStart(ctx context.Context, dockerCli command.Cli, backendOptions *BackendOptions, opts startOptions, services []string) error { |
| 55 | project, name, err := opts.projectOrName(ctx, dockerCli, services...) |
| 56 | if err != nil { |
| 57 | return err |
| 58 | } |
| 59 | |
| 60 | var timeout time.Duration |
| 61 | if opts.waitTimeout > 0 { |
| 62 | timeout = time.Duration(opts.waitTimeout) * time.Second |
| 63 | } |
| 64 | return withBackend(dockerCli, backendOptions, func(backend api.Compose) error { |
| 65 | return backend.Start(ctx, name, api.StartOptions{ |
| 66 | AttachTo: services, |
| 67 | Project: project, |
| 68 | Services: services, |
| 69 | Wait: opts.wait, |
| 70 | WaitTimeout: timeout, |
| 71 | }) |
| 72 | }) |
| 73 | } |
no test coverage detected