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

Function removeOptions

cmd/nerdctl/image/image_remove.go:45–66  ·  view source on GitHub ↗
(cmd *cobra.Command)

Source from the content-addressed store, hash-verified

43}
44
45func removeOptions(cmd *cobra.Command) (types.ImageRemoveOptions, error) {
46 globalOptions, err := helpers.ProcessRootCmdFlags(cmd)
47 if err != nil {
48 return types.ImageRemoveOptions{}, err
49 }
50
51 force, err := cmd.Flags().GetBool("force")
52 if err != nil {
53 return types.ImageRemoveOptions{}, err
54 }
55 async, err := cmd.Flags().GetBool("async")
56 if err != nil {
57 return types.ImageRemoveOptions{}, err
58 }
59
60 return types.ImageRemoveOptions{
61 Stdout: cmd.OutOrStdout(),
62 GOptions: globalOptions,
63 Force: force,
64 Async: async,
65 }, nil
66}
67
68func rmiAction(cmd *cobra.Command, args []string) error {
69 options, err := removeOptions(cmd)

Callers 1

rmiActionFunction · 0.70

Calls 1

ProcessRootCmdFlagsFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…