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

@@ -626,7 +626,7 @@ func (c *Client) ContentStore() content.Store {
func (c *Client) SnapshotService(snapshotterName string) snapshots.Snapshotter {
snapshotterName, err := c.resolveSnapshotterName(context.Background(), snapshotterName)
if err != nil {
snapshotterName = DefaultSnapshotter
snapshotterName = defaults.DefaultSnapshotter
}
if c.snapshotters != nil {
return c.snapshotters[snapshotterName]
@@ -801,7 +801,7 @@ func (c *Client) resolveSnapshotterName(ctx context.Context, name string) (strin
if label != "" {
name = label
} else {
name = DefaultSnapshotter
name = defaults.DefaultSnapshotter
}
}