(ctx context.Context, dockerCli command.Cli, backendOptions *BackendOptions, opts attachOpts)
| 66 | } |
| 67 | |
| 68 | func runAttach(ctx context.Context, dockerCli command.Cli, backendOptions *BackendOptions, opts attachOpts) error { |
| 69 | projectName, err := opts.toProjectName(ctx, dockerCli) |
| 70 | if err != nil { |
| 71 | return err |
| 72 | } |
| 73 | |
| 74 | attachOpts := api.AttachOptions{ |
| 75 | Service: opts.service, |
| 76 | Index: opts.index, |
| 77 | DetachKeys: opts.detachKeys, |
| 78 | NoStdin: opts.noStdin, |
| 79 | Proxy: opts.proxy, |
| 80 | } |
| 81 | backend, err := compose.NewComposeService(dockerCli, backendOptions.Options...) |
| 82 | if err != nil { |
| 83 | return err |
| 84 | } |
| 85 | return backend.Attach(ctx, projectName, attachOpts) |
| 86 | } |
no test coverage detected