From 0d4a5549d65ee390f59169b3efef2f0e6c108618 Mon Sep 17 00:00:00 2001 From: Miloslav Trmač Date: Sat, 28 Jul 2018 04:12:21 +0200 Subject: RFC: Remove unused transport name constants from libpod MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They are not used anywhere in the packagee. Two of the values still have users in the CLI, but used only once. So, use the .Transport.Name() calls in there directly, that is likely to be cheaper (and makes the files depend directly on the transports instead of referring to them indirectly through libpod). RFC: Should not change behavior in _this_ repo, but it is an externally-observable API change. Is there any user that could notice? Signed-off-by: Miloslav Trmač Closes: #1176 Approved by: rhatdan --- libpod/runtime_img.go | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'libpod') diff --git a/libpod/runtime_img.go b/libpod/runtime_img.go index f6038f8d0..47dad41da 100644 --- a/libpod/runtime_img.go +++ b/libpod/runtime_img.go @@ -5,11 +5,6 @@ import ( "fmt" "io" - "github.com/containers/image/directory" - "github.com/containers/image/docker" - dockerarchive "github.com/containers/image/docker/archive" - ociarchive "github.com/containers/image/oci/archive" - "github.com/containers/image/tarball" "github.com/containers/storage" "github.com/containers/storage/pkg/archive" ociv1 "github.com/opencontainers/image-spec/specs-go/v1" @@ -21,25 +16,6 @@ import ( // Runtime API -var ( - // DockerArchive is the transport we prepend to an image name - // when saving to docker-archive - DockerArchive = dockerarchive.Transport.Name() - // OCIArchive is the transport we prepend to an image name - // when saving to oci-archive - OCIArchive = ociarchive.Transport.Name() - // DirTransport is the transport for pushing and pulling - // images to and from a directory - DirTransport = directory.Transport.Name() - // TarballTransport is the transport for importing a tar archive - // and creating a filesystem image - TarballTransport = tarball.Transport.Name() - // Docker is the transport for docker registries - Docker = docker.Transport.Name() - // Atomic is the transport for atomic registries - Atomic = "atomic" -) - // CopyOptions contains the options given when pushing or pulling images type CopyOptions struct { // Compression specifies the type of compression which is applied to -- cgit v1.2.3-54-g00ecf