From 475bdf1a940ad3a1c125157220ef43e80e5816ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20=22WanzenBug=22=20Wanzenb=C3=B6ck?= Date: Tue, 21 Mar 2023 17:26:12 +0100 Subject: [PATCH] replace last usage of context.TODO() We already eliminated unnecessary context.Background() calls in c3dee0b, but a single context.TODO() was not caught. This commit fixes this, too. --- cmd/vm_cp.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmd/vm_cp.go b/cmd/vm_cp.go index fb58ae0..5e4463e 100644 --- a/cmd/vm_cp.go +++ b/cmd/vm_cp.go @@ -1,8 +1,6 @@ package cmd import ( - "context" - "github.com/LINBIT/virter/pkg/netcopy" log "github.com/sirupsen/logrus" @@ -27,7 +25,7 @@ func vmCpCommand() *cobra.Command { copier := netcopy.NewRsyncNetworkCopier() - if err := v.VMExecCopy(context.TODO(), copier, sourceSpec, destSpec); err != nil { + if err := v.VMExecCopy(cmd.Context(), copier, sourceSpec, destSpec); err != nil { log.Fatal(err) } },