Skip to content

Commit

Permalink
replace last usage of context.TODO()
Browse files Browse the repository at this point in the history
We already eliminated unnecessary context.Background() calls in c3dee0b,
but a single context.TODO() was not caught. This commit fixes this, too.
  • Loading branch information
WanzenBug committed Mar 21, 2023
1 parent c3dee0b commit 475bdf1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cmd/vm_cp.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package cmd

import (
"context"

"github.com/LINBIT/virter/pkg/netcopy"

log "github.com/sirupsen/logrus"
Expand All @@ -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)
}
},
Expand Down

0 comments on commit 475bdf1

Please sign in to comment.