MCPcopy
hub / github.com/genuinetools/img / newPullCommand

Function newPullCommand

pull.go:18–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16const pullUsageLongHelp = `Pull an image or a repository from a registry.`
17
18func newPullCommand() *cobra.Command {
19
20 pull := &pullCommand{}
21
22 cmd := &cobra.Command{
23 Use: "pull [OPTIONS] NAME[:TAG|@DIGEST]",
24 DisableFlagsInUseLine: true,
25 SilenceUsage: true,
26 Short: pullUsageShortHelp,
27 Long: pullUsageLongHelp,
28 Args: validatePullImageArgs,
29 RunE: func(cmd *cobra.Command, args []string) error {
30 return pull.Run(args)
31 },
32 }
33
34 return cmd
35}
36
37func validatePullImageArgs(cmd *cobra.Command, args []string) error {
38 if len(args) < 1 {

Callers 1

mainFunction · 0.85

Calls 1

RunMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…