MCPcopy Create free account
hub / github.com/containerd/nerdctl / listAction

Function listAction

cmd/nerdctl/network/network_list.go:46–70  ·  view source on GitHub ↗
(cmd *cobra.Command, args []string)

Source from the content-addressed store, hash-verified

44}
45
46func listAction(cmd *cobra.Command, args []string) error {
47 globalOptions, err := helpers.ProcessRootCmdFlags(cmd)
48 if err != nil {
49 return err
50 }
51 quiet, err := cmd.Flags().GetBool("quiet")
52 if err != nil {
53 return err
54 }
55 format, err := cmd.Flags().GetString("format")
56 if err != nil {
57 return err
58 }
59 filters, err := cmd.Flags().GetStringSlice("filter")
60 if err != nil {
61 return err
62 }
63 return network.List(cmd.Context(), types.NetworkListOptions{
64 GOptions: globalOptions,
65 Quiet: quiet,
66 Format: format,
67 Filters: filters,
68 Stdout: cmd.OutOrStdout(),
69 })
70}

Callers

nothing calls this directly

Calls 2

ProcessRootCmdFlagsFunction · 0.92
ListFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…