From 27107fdac1d75f97caab47cd13efb1d9900cf350 Mon Sep 17 00:00:00 2001 From: umohnani8 Date: Wed, 18 Apr 2018 16:48:35 -0400 Subject: Vendor in latest containers/image and contaners/storage Made necessary changes to functions to include contex.Context wherever needed Signed-off-by: umohnani8 Closes: #640 Approved by: baude --- test/copyimg/copyimg.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'test/copyimg') diff --git a/test/copyimg/copyimg.go b/test/copyimg/copyimg.go index f83f92766..26100beea 100644 --- a/test/copyimg/copyimg.go +++ b/test/copyimg/copyimg.go @@ -1,6 +1,7 @@ package main import ( + "context" "os" "github.com/containers/image/copy" @@ -156,9 +157,10 @@ func main() { } } + ctx := context.TODO() if imageName != "" { if importFrom != "" { - err = copy.Image(policyContext, ref, importRef, options) + err = copy.Image(ctx, policyContext, ref, importRef, options) if err != nil { logrus.Errorf("error importing %s: %v", importFrom, err) os.Exit(1) @@ -178,7 +180,7 @@ func main() { } } if exportTo != "" { - err = copy.Image(policyContext, exportRef, ref, options) + err = copy.Image(ctx, policyContext, exportRef, ref, options) if err != nil { logrus.Errorf("error exporting %s: %v", exportTo, err) os.Exit(1) @@ -186,7 +188,7 @@ func main() { } } else { if importFrom != "" && exportTo != "" { - err = copy.Image(policyContext, exportRef, importRef, options) + err = copy.Image(ctx, policyContext, exportRef, importRef, options) if err != nil { logrus.Errorf("error copying %s to %s: %v", importFrom, exportTo, err) os.Exit(1) -- cgit v1.2.3-54-g00ecf