(ctx context.Context, projectName string, options api.AttachOptions)
| 26 | ) |
| 27 | |
| 28 | func (s *composeService) Attach(ctx context.Context, projectName string, options api.AttachOptions) error { |
| 29 | projectName = strings.ToLower(projectName) |
| 30 | target, err := s.getSpecifiedContainer(ctx, projectName, oneOffInclude, false, options.Service, options.Index) |
| 31 | if err != nil { |
| 32 | return err |
| 33 | } |
| 34 | |
| 35 | detachKeys := options.DetachKeys |
| 36 | if detachKeys == "" { |
| 37 | detachKeys = s.configFile().DetachKeys |
| 38 | } |
| 39 | |
| 40 | var attach container.AttachOptions |
| 41 | attach.DetachKeys = detachKeys |
| 42 | attach.NoStdin = options.NoStdin |
| 43 | attach.Proxy = options.Proxy |
| 44 | return container.RunAttach(ctx, s.dockerCli, target.ID, &attach) |
| 45 | } |
nothing calls this directly
no test coverage detected