Move DefaultSnapshotter constants

Move the DefaultSnapshotter constants to the defaults package.
Fixes issue #8226.

Signed-off-by: James Jenkins <James.Jenkins@ibm.com>
This commit is contained in:
James Jenkins
2023-04-05 11:59:54 -04:00
parent 0a7c192ca9
commit 8aa2551ce0
16 changed files with 35 additions and 31 deletions

View File

@@ -20,8 +20,8 @@ import (
"context"
"fmt"
containerd "github.com/containerd/containerd/v2/client"
"github.com/containerd/containerd/v2/content"
"github.com/containerd/containerd/v2/defaults"
"github.com/containerd/containerd/v2/errdefs"
"github.com/containerd/containerd/v2/images"
"github.com/containerd/containerd/v2/pkg/transfer"
@@ -286,7 +286,7 @@ func getSupportedPlatform(uc transfer.UnpackConfiguration, supportedPlatforms []
// Assume sp.SnapshotterKey is not empty
if uc.Snapshotter == sp.SnapshotterKey {
return true, sp
} else if uc.Snapshotter == "" && sp.SnapshotterKey == containerd.DefaultSnapshotter {
} else if uc.Snapshotter == "" && sp.SnapshotterKey == defaults.DefaultSnapshotter {
return true, sp
}
}