(cmd *cobra.Command, args []string)
| 124 | } |
| 125 | |
| 126 | func psAction(cmd *cobra.Command, args []string) error { |
| 127 | clOpts, fpOpts, err := processOptions(cmd) |
| 128 | if err != nil { |
| 129 | return err |
| 130 | } |
| 131 | |
| 132 | client, ctx, cancel, err := clientutil.NewClient(cmd.Context(), clOpts.GOptions.Namespace, clOpts.GOptions.Address) |
| 133 | if err != nil { |
| 134 | return err |
| 135 | } |
| 136 | defer cancel() |
| 137 | |
| 138 | containers, err := container.List(ctx, client, clOpts) |
| 139 | if err != nil { |
| 140 | return err |
| 141 | } |
| 142 | |
| 143 | return formatAndPrintContainerInfo(containers, fpOpts) |
| 144 | } |
| 145 | |
| 146 | // FormattingAndPrintingOptions specifies options for formatting and printing of `nerdctl (container) list`. |
| 147 | type FormattingAndPrintingOptions struct { |
nothing calls this directly
no test coverage detected
searching dependent graphs…