summaryrefslogtreecommitdiff
path: root/libpod/runtime_ctr.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-04-12 10:21:45 -0400
committerMatthew Heon <matthew.heon@pm.me>2019-04-12 10:59:00 -0400
commitf7951c8776cea5eeddd8838ac6a4f41f518032fd (patch)
tree98adf052050bd0ed5b616ff3f2c60e25b38c70c4 /libpod/runtime_ctr.go
parent638789fd88f60839bd65cad3bc28f0c698d41e32 (diff)
downloadpodman-f7951c8776cea5eeddd8838ac6a4f41f518032fd.tar.gz
podman-f7951c8776cea5eeddd8838ac6a4f41f518032fd.tar.bz2
podman-f7951c8776cea5eeddd8838ac6a4f41f518032fd.zip
Use GetContainer instead of LookupContainer for full ID
All IDs in libpod are stored as a full container ID. We can get a container by full ID faster with GetContainer (which directly retrieves) than LookupContainer (which finds a match, then retrieves). No reason to use Lookup when we have full IDs present and available. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/runtime_ctr.go')
-rw-r--r--libpod/runtime_ctr.go10
1 files changed, 0 insertions, 10 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index 800b42851..704dce492 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -547,16 +547,6 @@ func (r *Runtime) GetLatestContainer() (*Container, error) {
return ctrs[lastCreatedIndex], nil
}
-// Export is the libpod portion of exporting a container to a tar file
-func (r *Runtime) Export(name string, path string) error {
- ctr, err := r.LookupContainer(name)
- if err != nil {
- return err
- }
- return ctr.Export(path)
-
-}
-
// RemoveContainersFromStorage attempt to remove containers from storage that do not exist in libpod database
func (r *Runtime) RemoveContainersFromStorage(ctrs []string) {
for _, i := range ctrs {