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

Function removeAction

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

Source from the content-addressed store, hash-verified

43}
44
45func removeAction(cmd *cobra.Command, args []string) error {
46 globalOptions, err := helpers.ProcessRootCmdFlags(cmd)
47 if err != nil {
48 return err
49 }
50
51 options := types.NetworkRemoveOptions{
52 GOptions: globalOptions,
53 Networks: args,
54 Stdout: cmd.OutOrStdout(),
55 }
56
57 client, ctx, cancel, err := clientutil.NewClient(cmd.Context(), options.GOptions.Namespace, options.GOptions.Address)
58 if err != nil {
59 return err
60 }
61 defer cancel()
62
63 return network.Remove(ctx, client, options)
64}
65
66func networkRmShellComplete(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
67 // show network names, including "bridge"

Callers

nothing calls this directly

Calls 3

ProcessRootCmdFlagsFunction · 0.92
NewClientFunction · 0.92
RemoveFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…