@@ -15,7 +15,10 @@ import (
1515)
1616
1717// PullOptions defines what and how to pull
18- type PullOptions struct {
18+ type PullOptions = pullOptions
19+
20+ // pullOptions defines what and how to pull.
21+ type pullOptions struct {
1922 remote string
2023 all bool
2124 platform string
@@ -25,15 +28,15 @@ type PullOptions struct {
2528
2629// NewPullCommand creates a new `docker pull` command
2730func NewPullCommand (dockerCli command.Cli ) * cobra.Command {
28- var opts PullOptions
31+ var opts pullOptions
2932
3033 cmd := & cobra.Command {
3134 Use : "pull [OPTIONS] NAME[:TAG|@DIGEST]" ,
3235 Short : "Download an image from a registry" ,
3336 Args : cli .ExactArgs (1 ),
3437 RunE : func (cmd * cobra.Command , args []string ) error {
3538 opts .remote = args [0 ]
36- return RunPull (cmd .Context (), dockerCli , opts )
39+ return runPull (cmd .Context (), dockerCli , opts )
3740 },
3841 Annotations : map [string ]string {
3942 "category-top" : "5" ,
@@ -57,6 +60,11 @@ func NewPullCommand(dockerCli command.Cli) *cobra.Command {
5760
5861// RunPull performs a pull against the engine based on the specified options
5962func RunPull (ctx context.Context , dockerCLI command.Cli , opts PullOptions ) error {
63+ return runPull (ctx , dockerCLI , opts )
64+ }
65+
66+ // runPull performs a pull against the engine based on the specified options
67+ func runPull (ctx context.Context , dockerCLI command.Cli , opts pullOptions ) error {
6068 distributionRef , err := reference .ParseNormalizedNamed (opts .remote )
6169 switch {
6270 case err != nil :
0 commit comments