(cmd *cobra.Command)
| 63 | } |
| 64 | |
| 65 | func attachOptions(cmd *cobra.Command) (types.ContainerAttachOptions, error) { |
| 66 | globalOptions, err := helpers.ProcessRootCmdFlags(cmd) |
| 67 | if err != nil { |
| 68 | return types.ContainerAttachOptions{}, err |
| 69 | } |
| 70 | detachKeys, err := cmd.Flags().GetString("detach-keys") |
| 71 | if err != nil { |
| 72 | return types.ContainerAttachOptions{}, err |
| 73 | } |
| 74 | noStdin, err := cmd.Flags().GetBool("no-stdin") |
| 75 | if err != nil { |
| 76 | return types.ContainerAttachOptions{}, err |
| 77 | } |
| 78 | |
| 79 | var stdin io.Reader |
| 80 | if !noStdin { |
| 81 | stdin = cmd.InOrStdin() |
| 82 | } |
| 83 | return types.ContainerAttachOptions{ |
| 84 | GOptions: globalOptions, |
| 85 | Stdin: stdin, |
| 86 | Stdout: cmd.OutOrStdout(), |
| 87 | Stderr: cmd.ErrOrStderr(), |
| 88 | DetachKeys: detachKeys, |
| 89 | }, nil |
| 90 | } |
| 91 | |
| 92 | func attachAction(cmd *cobra.Command, args []string) error { |
| 93 | options, err := attachOptions(cmd) |
no test coverage detected
searching dependent graphs…