Sfoglia il codice sorgente

daemon/containerd: change alias for oci-specs to match existing code

We use "specs" as alias in most places; rename the alias here accordingly
to prevent confusiong and reduce the risk of introducing duplicate imports.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 3 anni fa
parent
commit
91bd9a6642
1 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 4 4
      daemon/containerd/service.go

+ 4 - 4
daemon/containerd/service.go

@@ -20,7 +20,7 @@ import (
 	"github.com/docker/docker/image"
 	"github.com/docker/docker/image"
 	"github.com/docker/docker/layer"
 	"github.com/docker/docker/layer"
 	"github.com/opencontainers/go-digest"
 	"github.com/opencontainers/go-digest"
-	ocispec "github.com/opencontainers/image-spec/specs-go/v1"
+	specs "github.com/opencontainers/image-spec/specs-go/v1"
 )
 )
 
 
 // ImageService implements daemon.ImageService
 // ImageService implements daemon.ImageService
@@ -37,7 +37,7 @@ func NewService(c *containerd.Client) *ImageService {
 
 
 // PullImage initiates a pull operation. image is the repository name to pull, and
 // PullImage initiates a pull operation. image is the repository name to pull, and
 // tagOrDigest may be either empty, or indicate a specific tag or digest to pull.
 // tagOrDigest may be either empty, or indicate a specific tag or digest to pull.
-func (cs *ImageService) PullImage(ctx context.Context, image, tagOrDigest string, platform *ocispec.Platform, metaHeaders map[string][]string, authConfig *types.AuthConfig, outStream io.Writer) error {
+func (cs *ImageService) PullImage(ctx context.Context, image, tagOrDigest string, platform *specs.Platform, metaHeaders map[string][]string, authConfig *types.AuthConfig, outStream io.Writer) error {
 	var opts []containerd.RemoteOpt
 	var opts []containerd.RemoteOpt
 	if platform != nil {
 	if platform != nil {
 		opts = append(opts, containerd.WithPlatform(platforms.Format(*platform)))
 		opts = append(opts, containerd.WithPlatform(platforms.Format(*platform)))
@@ -248,7 +248,7 @@ func (cs *ImageService) ImagesPrune(ctx context.Context, pruneFilters filters.Ar
 // inConfig (if src is "-"), or from a URI specified in src. Progress output is
 // inConfig (if src is "-"), or from a URI specified in src. Progress output is
 // written to outStream. Repository and tag names can optionally be given in
 // written to outStream. Repository and tag names can optionally be given in
 // the repo and tag arguments, respectively.
 // the repo and tag arguments, respectively.
-func (cs *ImageService) ImportImage(src string, repository string, platform *ocispec.Platform, tag string, msg string, inConfig io.ReadCloser, outStream io.Writer, changes []string) error {
+func (cs *ImageService) ImportImage(src string, repository string, platform *specs.Platform, tag string, msg string, inConfig io.ReadCloser, outStream io.Writer, changes []string) error {
 	panic("not implemented")
 	panic("not implemented")
 }
 }
 
 
@@ -307,7 +307,7 @@ func (cs *ImageService) CommitImage(c backend.CommitConfig) (image.ID, error) {
 }
 }
 
 
 // GetImage returns an image corresponding to the image referred to by refOrID.
 // GetImage returns an image corresponding to the image referred to by refOrID.
-func (cs *ImageService) GetImage(refOrID string, platform *ocispec.Platform) (retImg *image.Image, retErr error) {
+func (cs *ImageService) GetImage(refOrID string, platform *specs.Platform) (retImg *image.Image, retErr error) {
 	panic("not implemented")
 	panic("not implemented")
 }
 }