(p *ProjectOptions, dockerCli command.Cli, backendOptions *BackendOptions)
| 30 | } |
| 31 | |
| 32 | func pauseCommand(p *ProjectOptions, dockerCli command.Cli, backendOptions *BackendOptions) *cobra.Command { |
| 33 | opts := pauseOptions{ |
| 34 | ProjectOptions: p, |
| 35 | } |
| 36 | cmd := &cobra.Command{ |
| 37 | Use: "pause [SERVICE...]", |
| 38 | Short: "Pause services", |
| 39 | RunE: Adapt(func(ctx context.Context, args []string) error { |
| 40 | return runPause(ctx, dockerCli, backendOptions, opts, args) |
| 41 | }), |
| 42 | ValidArgsFunction: completeServiceNames(dockerCli, p), |
| 43 | } |
| 44 | return cmd |
| 45 | } |
| 46 | |
| 47 | func runPause(ctx context.Context, dockerCli command.Cli, backendOptions *BackendOptions, opts pauseOptions, services []string) error { |
| 48 | project, name, err := opts.projectOrName(ctx, dockerCli, services...) |
no test coverage detected