(cmd *cobra.Command, args []string)
| 38 | } |
| 39 | |
| 40 | func stopAction(cmd *cobra.Command, args []string) error { |
| 41 | globalOptions, err := helpers.ProcessRootCmdFlags(cmd) |
| 42 | if err != nil { |
| 43 | return err |
| 44 | } |
| 45 | var opt composer.StopOptions |
| 46 | |
| 47 | if cmd.Flags().Changed("timeout") { |
| 48 | timeValue, err := cmd.Flags().GetUint("timeout") |
| 49 | if err != nil { |
| 50 | return err |
| 51 | } |
| 52 | opt.Timeout = &timeValue |
| 53 | } |
| 54 | |
| 55 | client, ctx, cancel, err := clientutil.NewClient(cmd.Context(), globalOptions.Namespace, globalOptions.Address) |
| 56 | if err != nil { |
| 57 | return err |
| 58 | } |
| 59 | defer cancel() |
| 60 | options, err := getComposeOptions(cmd, globalOptions.DebugFull, globalOptions.Experimental) |
| 61 | if err != nil { |
| 62 | return err |
| 63 | } |
| 64 | c, err := compose.New(client, globalOptions, options, cmd.OutOrStdout(), cmd.ErrOrStderr()) |
| 65 | if err != nil { |
| 66 | return err |
| 67 | } |
| 68 | return c.Stop(ctx, opt, args) |
| 69 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…