Skip to content

Commit ec12b58

Browse files
committed
Move image load func to imgutil package
Signed-off-by: Austin Vazquez <[email protected]>
1 parent 07cb00b commit ec12b58

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

cmd/nerdctl/image/image_load.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"github.com/containerd/nerdctl/v2/cmd/nerdctl/helpers"
2424
"github.com/containerd/nerdctl/v2/pkg/api/types"
2525
"github.com/containerd/nerdctl/v2/pkg/clientutil"
26-
"github.com/containerd/nerdctl/v2/pkg/cmd/image"
26+
"github.com/containerd/nerdctl/v2/pkg/imgutil/load"
2727
)
2828

2929
func NewLoadCommand() *cobra.Command {
@@ -94,5 +94,5 @@ func loadAction(cmd *cobra.Command, _ []string) error {
9494
}
9595
defer cancel()
9696

97-
return image.Load(ctx, client, options)
97+
return load.Load(ctx, client, options)
9898
}

pkg/cmd/image/load.go renamed to pkg/imgutil/load/load.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
limitations under the License.
1515
*/
1616

17-
package image
17+
package load
1818

1919
import (
2020
"context"
@@ -98,6 +98,7 @@ func loadImage(ctx context.Context, client *containerd.Client, in io.Reader, pla
9898
if !options.Quiet {
9999
fmt.Fprintf(options.Stdout, "unpacking %s (%s)...\n", img.Name, img.Target.Digest)
100100
}
101+
101102
err = image.Unpack(ctx, options.GOptions.Snapshotter)
102103
if err != nil {
103104
return err

0 commit comments

Comments
 (0)