(cmd *cobra.Command, args []string)
| 43 | } |
| 44 | |
| 45 | func killAction(cmd *cobra.Command, args []string) error { |
| 46 | globalOptions, err := helpers.ProcessRootCmdFlags(cmd) |
| 47 | if err != nil { |
| 48 | return err |
| 49 | } |
| 50 | killSignal, err := cmd.Flags().GetString("signal") |
| 51 | if err != nil { |
| 52 | return err |
| 53 | } |
| 54 | options := types.ContainerKillOptions{ |
| 55 | GOptions: globalOptions, |
| 56 | KillSignal: killSignal, |
| 57 | Stdout: cmd.OutOrStdout(), |
| 58 | Stderr: cmd.ErrOrStderr(), |
| 59 | } |
| 60 | |
| 61 | client, ctx, cancel, err := clientutil.NewClient(cmd.Context(), options.GOptions.Namespace, options.GOptions.Address) |
| 62 | if err != nil { |
| 63 | return err |
| 64 | } |
| 65 | defer cancel() |
| 66 | |
| 67 | return container.Kill(ctx, client, args, options) |
| 68 | } |
| 69 | |
| 70 | func killShellComplete(cmd *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) { |
| 71 | // show non-stopped container names |
nothing calls this directly
no test coverage detected
searching dependent graphs…