Skip to content

Commit

Permalink
Replaced context.TODO()-->context. Background()
Browse files Browse the repository at this point in the history
Signed-off-by: yanggang <[email protected]>
  • Loading branch information
yanggang committed Sep 21, 2023
1 parent b272542 commit 1d185bf
Show file tree
Hide file tree
Showing 82 changed files with 320 additions and 224 deletions.
4 changes: 2 additions & 2 deletions internal/delete/delete_item_action_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ func (h *harness) addResource(t *testing.T, resource *test.APIResource) {

unstructuredObj := &unstructured.Unstructured{Object: obj}
if resource.Namespaced {
_, err = h.DynamicClient.Resource(resource.GVR()).Namespace(item.GetNamespace()).Create(context.TODO(), unstructuredObj, metav1.CreateOptions{})
_, err = h.DynamicClient.Resource(resource.GVR()).Namespace(item.GetNamespace()).Create(context.Background(), unstructuredObj, metav1.CreateOptions{})
} else {
_, err = h.DynamicClient.Resource(resource.GVR()).Create(context.TODO(), unstructuredObj, metav1.CreateOptions{})
_, err = h.DynamicClient.Resource(resource.GVR()).Create(context.Background(), unstructuredObj, metav1.CreateOptions{})
}
require.NoError(t, err)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/backup/backup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3254,9 +3254,9 @@ func (h *harness) addItems(t *testing.T, resource *test.APIResource) {
unstructuredObj := &unstructured.Unstructured{Object: obj}

if resource.Namespaced {
_, err = h.DynamicClient.Resource(resource.GVR()).Namespace(item.GetNamespace()).Create(context.TODO(), unstructuredObj, metav1.CreateOptions{})
_, err = h.DynamicClient.Resource(resource.GVR()).Namespace(item.GetNamespace()).Create(context.Background(), unstructuredObj, metav1.CreateOptions{})
} else {
_, err = h.DynamicClient.Resource(resource.GVR()).Create(context.TODO(), unstructuredObj, metav1.CreateOptions{})
_, err = h.DynamicClient.Resource(resource.GVR()).Create(context.Background(), unstructuredObj, metav1.CreateOptions{})
}
require.NoError(t, err)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/backup/rbac.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ type v1ClusterRoleBindingLister struct {
}

func (v1 v1ClusterRoleBindingLister) List() ([]ClusterRoleBinding, error) {
crbList, err := v1.client.List(context.TODO(), metav1.ListOptions{})
crbList, err := v1.client.List(context.Background(), metav1.ListOptions{})
if err != nil {
return nil, errors.WithStack(err)
}
Expand All @@ -64,7 +64,7 @@ type v1beta1ClusterRoleBindingLister struct {
}

func (v1beta1 v1beta1ClusterRoleBindingLister) List() ([]ClusterRoleBinding, error) {
crbList, err := v1beta1.client.List(context.TODO(), metav1.ListOptions{})
crbList, err := v1beta1.client.List(context.Background(), metav1.ListOptions{})
if err != nil {
return nil, errors.WithStack(err)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/backup/remap_crd_version_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ CheckVersion:
}

func fetchV1beta1CRD(name string, betaCRDClient apiextv1beta1client.CustomResourceDefinitionInterface) (*unstructured.Unstructured, error) {
betaCRD, err := betaCRDClient.Get(context.TODO(), name, metav1.GetOptions{})
betaCRD, err := betaCRDClient.Get(context.Background(), name, metav1.GetOptions{})
if err != nil {
return nil, errors.Wrapf(err, "error fetching v1beta1 version of %s", name)
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/backup/remap_crd_version_action_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func TestRemapCRDVersionAction(t *testing.T) {
// keep the same one for all 3 tests, since there's little value in recreating it
b := builder.ForCustomResourceDefinitionV1Beta1("test.velero.io")
c := b.Result()
_, err := betaClient.Create(context.TODO(), c, metav1.CreateOptions{})
_, err := betaClient.Create(context.Background(), c, metav1.CreateOptions{})
require.NoError(t, err)
a := NewRemapCRDVersionAction(velerotest.NewLogger(), betaClient, fakeDiscoveryHelper())

Expand Down Expand Up @@ -190,7 +190,7 @@ func TestRemapCRDVersionActionData(t *testing.T) {
err = json.Unmarshal(f, &crd)
require.NoError(t, err)

_, err = betaClient.Create(context.TODO(), &crd, metav1.CreateOptions{})
_, err = betaClient.Create(context.Background(), &crd, metav1.CreateOptions{})
require.NoError(t, err)

// Run method under test
Expand All @@ -214,7 +214,7 @@ func TestRemapCRDVersionActionData(t *testing.T) {
}

// Clean up the item created in the test.
betaClient.Delete(context.TODO(), crd.Name, metav1.DeleteOptions{})
betaClient.Delete(context.Background(), crd.Name, metav1.DeleteOptions{})
})
}

Expand Down
14 changes: 7 additions & 7 deletions pkg/client/dynamic.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,29 +113,29 @@ type dynamicResourceClient struct {
var _ Dynamic = &dynamicResourceClient{}

func (d *dynamicResourceClient) Create(obj *unstructured.Unstructured) (*unstructured.Unstructured, error) {
return d.resourceClient.Create(context.TODO(), obj, metav1.CreateOptions{})
return d.resourceClient.Create(context.Background(), obj, metav1.CreateOptions{})
}

func (d *dynamicResourceClient) List(options metav1.ListOptions) (*unstructured.UnstructuredList, error) {
return d.resourceClient.List(context.TODO(), options)
return d.resourceClient.List(context.Background(), options)
}

func (d *dynamicResourceClient) Watch(options metav1.ListOptions) (watch.Interface, error) {
return d.resourceClient.Watch(context.TODO(), options)
return d.resourceClient.Watch(context.Background(), options)
}

func (d *dynamicResourceClient) Get(name string, opts metav1.GetOptions) (*unstructured.Unstructured, error) {
return d.resourceClient.Get(context.TODO(), name, opts)
return d.resourceClient.Get(context.Background(), name, opts)
}

func (d *dynamicResourceClient) Patch(name string, data []byte) (*unstructured.Unstructured, error) {
return d.resourceClient.Patch(context.TODO(), name, types.MergePatchType, data, metav1.PatchOptions{})
return d.resourceClient.Patch(context.Background(), name, types.MergePatchType, data, metav1.PatchOptions{})
}

func (d *dynamicResourceClient) Delete(name string, opts metav1.DeleteOptions) error {
return d.resourceClient.Delete(context.TODO(), name, opts)
return d.resourceClient.Delete(context.Background(), name, opts)
}

func (d *dynamicResourceClient) UpdateStatus(obj *unstructured.Unstructured, opts metav1.UpdateOptions) (*unstructured.Unstructured, error) {
return d.resourceClient.UpdateStatus(context.TODO(), obj, opts)
return d.resourceClient.UpdateStatus(context.Background(), obj, opts)
}
8 changes: 4 additions & 4 deletions pkg/cmd/cli/backup/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func (o *CreateOptions) Validate(c *cobra.Command, args []string, f client.Facto

if o.StorageLocation != "" {
location := &velerov1api.BackupStorageLocation{}
if err := o.client.Get(context.TODO(), kbclient.ObjectKey{
if err := o.client.Get(context.Background(), kbclient.ObjectKey{
Namespace: f.Namespace(),
Name: o.StorageLocation,
}, location); err != nil {
Expand All @@ -196,7 +196,7 @@ func (o *CreateOptions) Validate(c *cobra.Command, args []string, f client.Facto

for _, loc := range o.SnapshotLocations {
snapshotLocation := new(velerov1api.VolumeSnapshotLocation)
if err := o.client.Get(context.TODO(), kbclient.ObjectKey{Namespace: f.Namespace(), Name: loc}, snapshotLocation); err != nil {
if err := o.client.Get(context.Background(), kbclient.ObjectKey{Namespace: f.Namespace(), Name: loc}, snapshotLocation); err != nil {
return err
}
}
Expand Down Expand Up @@ -276,7 +276,7 @@ func (o *CreateOptions) Run(c *cobra.Command, f client.Factory) error {
go backupInformer.Run(stop)
}

err = o.client.Create(context.TODO(), backup, &kbclient.CreateOptions{})
err = o.client.Create(context.Background(), backup, &kbclient.CreateOptions{})
if err != nil {
return err
}
Expand Down Expand Up @@ -340,7 +340,7 @@ func (o *CreateOptions) BuildBackup(namespace string) (*velerov1api.Backup, erro

if o.FromSchedule != "" {
schedule := new(velerov1api.Schedule)
err := o.client.Get(context.TODO(), kbclient.ObjectKey{Namespace: namespace, Name: o.FromSchedule}, schedule)
err := o.client.Get(context.Background(), kbclient.ObjectKey{Namespace: namespace, Name: o.FromSchedule}, schedule)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/cli/backup/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func TestCreateOptions_BuildBackupFromSchedule(t *testing.T) {

expectedBackupSpec := builder.ForBackup("test", cmdtest.VeleroNameSpace).IncludedNamespaces("test").Result().Spec
schedule := builder.ForSchedule(cmdtest.VeleroNameSpace, "test").Template(expectedBackupSpec).ObjectMeta(builder.WithLabels("velero.io/test", "true"), builder.WithAnnotations("velero.io/test", "true")).Result()
o.client.Create(context.TODO(), schedule, &kbclient.CreateOptions{})
o.client.Create(context.Background(), schedule, &kbclient.CreateOptions{})

t.Run("existing schedule", func(t *testing.T) {
backup, err := o.BuildBackup(cmdtest.VeleroNameSpace)
Expand Down
6 changes: 3 additions & 3 deletions pkg/cmd/cli/backup/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func Run(o *cli.DeleteOptions) error {
case len(o.Names) > 0:
for _, name := range o.Names {
backup := new(velerov1api.Backup)
err := o.Client.Get(context.TODO(), controllerclient.ObjectKey{Namespace: o.Namespace, Name: name}, backup)
err := o.Client.Get(context.Background(), controllerclient.ObjectKey{Namespace: o.Namespace, Name: name}, backup)
if err != nil {
errs = append(errs, errors.WithStack(err))
continue
Expand All @@ -104,7 +104,7 @@ func Run(o *cli.DeleteOptions) error {
}

backupList := new(velerov1api.BackupList)
err := o.Client.List(context.TODO(), backupList, &controllerclient.ListOptions{LabelSelector: selector, Namespace: o.Namespace})
err := o.Client.List(context.Background(), backupList, &controllerclient.ListOptions{LabelSelector: selector, Namespace: o.Namespace})
if err != nil {
return errors.WithStack(err)
}
Expand All @@ -124,7 +124,7 @@ func Run(o *cli.DeleteOptions) error {
ObjectMeta(builder.WithLabels(velerov1api.BackupNameLabel, label.GetValidName(b.Name),
velerov1api.BackupUIDLabel, string(b.UID)), builder.WithGenerateName(b.Name+"-")).Result()

if err := o.Client.Create(context.TODO(), deleteRequest, &controllerclient.CreateOptions{}); err != nil {
if err := o.Client.Create(context.Background(), deleteRequest, &controllerclient.CreateOptions{}); err != nil {
errs = append(errs, err)
continue
}
Expand Down
10 changes: 5 additions & 5 deletions pkg/cmd/cli/backup/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,21 +73,21 @@ func NewDescribeCommand(f client.Factory, use string) *cobra.Command {
if len(args) > 0 {
for _, name := range args {
backup := new(velerov1api.Backup)
err := kbClient.Get(context.TODO(), controllerclient.ObjectKey{Namespace: f.Namespace(), Name: name}, backup)
err := kbClient.Get(context.Background(), controllerclient.ObjectKey{Namespace: f.Namespace(), Name: name}, backup)
cmd.CheckError(err)
backups.Items = append(backups.Items, *backup)
}
} else {
parsedSelector, err := labels.Parse(listOptions.LabelSelector)
cmd.CheckError(err)
err = kbClient.List(context.TODO(), backups, &controllerclient.ListOptions{LabelSelector: parsedSelector, Namespace: f.Namespace()})
err = kbClient.List(context.Background(), backups, &controllerclient.ListOptions{LabelSelector: parsedSelector, Namespace: f.Namespace()})
cmd.CheckError(err)
}

first := true
for i, backup := range backups.Items {
deleteRequestList := new(velerov1api.DeleteBackupRequestList)
err := kbClient.List(context.TODO(), deleteRequestList, &controllerclient.ListOptions{
err := kbClient.List(context.Background(), deleteRequestList, &controllerclient.ListOptions{
Namespace: f.Namespace(),
LabelSelector: labels.SelectorFromSet(map[string]string{velerov1api.BackupNameLabel: label.GetValidName(backup.Name), velerov1api.BackupUIDLabel: string(backup.UID)}),
})
Expand All @@ -96,7 +96,7 @@ func NewDescribeCommand(f client.Factory, use string) *cobra.Command {
}

podVolumeBackupList := new(velerov1api.PodVolumeBackupList)
err = kbClient.List(context.TODO(), podVolumeBackupList, &controllerclient.ListOptions{
err = kbClient.List(context.Background(), podVolumeBackupList, &controllerclient.ListOptions{
Namespace: f.Namespace(),
LabelSelector: labels.SelectorFromSet(map[string]string{velerov1api.BackupNameLabel: label.GetValidName(backup.Name)}),
})
Expand All @@ -108,7 +108,7 @@ func NewDescribeCommand(f client.Factory, use string) *cobra.Command {
vscList := new(snapshotv1api.VolumeSnapshotContentList)
if features.IsEnabled(velerov1api.CSIFeatureFlag) {
opts := label.NewListOptionsForBackup(backup.Name)
vscList, err = csiClient.SnapshotV1().VolumeSnapshotContents().List(context.TODO(), opts)
vscList, err = csiClient.SnapshotV1().VolumeSnapshotContents().List(context.Background(), opts)
if err != nil {
fmt.Fprintf(os.Stderr, "error getting VolumeSnapshotContent objects for backup %s: %v\n", backup.Name, err)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/cli/backup/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (o *DownloadOptions) Validate(c *cobra.Command, args []string, f client.Fac
cmd.CheckError(err)

backup := new(velerov1api.Backup)
if err := kbClient.Get(context.TODO(), controllerclient.ObjectKey{Namespace: f.Namespace(), Name: o.Name}, backup); err != nil {
if err := kbClient.Get(context.Background(), controllerclient.ObjectKey{Namespace: f.Namespace(), Name: o.Name}, backup); err != nil {
return err
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/cli/backup/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ func NewGetCommand(f client.Factory, use string) *cobra.Command {
if len(args) > 0 {
for _, name := range args {
backup := new(api.Backup)
err := kbClient.Get(context.TODO(), kbclient.ObjectKey{Namespace: f.Namespace(), Name: name}, backup)
err := kbClient.Get(context.Background(), kbclient.ObjectKey{Namespace: f.Namespace(), Name: name}, backup)
cmd.CheckError(err)
backups.Items = append(backups.Items, *backup)
}
} else {
parsedSelector, err := labels.Parse(listOptions.LabelSelector)
cmd.CheckError(err)
err = kbClient.List(context.TODO(), backups, &kbclient.ListOptions{
err = kbClient.List(context.Background(), backups, &kbclient.ListOptions{
LabelSelector: parsedSelector,
Namespace: f.Namespace(),
})
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/cli/backup/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (l *LogsOptions) BindFlags(flags *pflag.FlagSet) {

func (l *LogsOptions) Run(c *cobra.Command, f client.Factory) error {
backup := new(velerov1api.Backup)
err := l.Client.Get(context.TODO(), kbclient.ObjectKey{Namespace: f.Namespace(), Name: l.BackupName}, backup)
err := l.Client.Get(context.Background(), kbclient.ObjectKey{Namespace: f.Namespace(), Name: l.BackupName}, backup)
if apierrors.IsNotFound(err) {
return fmt.Errorf("backup %q does not exist", l.BackupName)
} else if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions pkg/cmd/cli/debug/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (o *option) validate(f client.Factory) error {
if err != nil {
return err
}
l, err := kubeClient.AppsV1().Deployments(o.namespace).List(context.TODO(), metav1.ListOptions{
l, err := kubeClient.AppsV1().Deployments(o.namespace).List(context.Background(), metav1.ListOptions{
LabelSelector: "component=velero",
})
if err != nil {
Expand All @@ -128,12 +128,12 @@ func (o *option) validate(f client.Factory) error {
return err
}
if len(o.backup) > 0 {
if _, err := veleroClient.VeleroV1().Backups(o.namespace).Get(context.TODO(), o.backup, metav1.GetOptions{}); err != nil {
if _, err := veleroClient.VeleroV1().Backups(o.namespace).Get(context.Background(), o.backup, metav1.GetOptions{}); err != nil {
return err
}
}
if len(o.restore) > 0 {
if _, err := veleroClient.VeleroV1().Restores(o.namespace).Get(context.TODO(), o.restore, metav1.GetOptions{}); err != nil {
if _, err := veleroClient.VeleroV1().Restores(o.namespace).Get(context.Background(), o.restore, metav1.GetOptions{}); err != nil {
return err
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/cli/nodeagent/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func Test_validatePodVolumesHostPath(t *testing.T) {

kubeClient := fake.NewSimpleClientset()
for _, pod := range tt.pods {
_, err := kubeClient.CoreV1().Pods(pod.GetNamespace()).Create(context.TODO(), pod, metav1.CreateOptions{})
_, err := kubeClient.CoreV1().Pods(pod.GetNamespace()).Create(context.Background(), pod, metav1.CreateOptions{})
if err != nil {
t.Error(err)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/cli/plugin/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func NewAddCommand(f client.Factory) *cobra.Command {
cmd.CheckError(err)
}

veleroDeploy, err := veleroDeployment(context.TODO(), kubeClient, f.Namespace())
veleroDeploy, err := veleroDeployment(context.Background(), kubeClient, f.Namespace())
if err != nil {
cmd.CheckError(err)
}
Expand Down Expand Up @@ -116,7 +116,7 @@ func NewAddCommand(f client.Factory) *cobra.Command {
patchBytes, err := jsonpatch.CreateMergePatch(original, updated)
cmd.CheckError(err)

_, err = kubeClient.AppsV1().Deployments(veleroDeploy.Namespace).Patch(context.TODO(), veleroDeploy.Name, types.MergePatchType, patchBytes, metav1.PatchOptions{})
_, err = kubeClient.AppsV1().Deployments(veleroDeploy.Namespace).Patch(context.Background(), veleroDeploy.Name, types.MergePatchType, patchBytes, metav1.PatchOptions{})
cmd.CheckError(err)
},
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/cli/plugin/remove.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func NewRemoveCommand(f client.Factory) *cobra.Command {
cmd.CheckError(err)
}

veleroDeploy, err := veleroDeployment(context.TODO(), kubeClient, f.Namespace())
veleroDeploy, err := veleroDeployment(context.Background(), kubeClient, f.Namespace())
if err != nil {
cmd.CheckError(err)
}
Expand Down Expand Up @@ -73,7 +73,7 @@ func NewRemoveCommand(f client.Factory) *cobra.Command {
patchBytes, err := jsonpatch.CreateMergePatch(original, updated)
cmd.CheckError(err)

_, err = kubeClient.AppsV1().Deployments(veleroDeploy.Namespace).Patch(context.TODO(), veleroDeploy.Name, types.MergePatchType, patchBytes, metav1.PatchOptions{})
_, err = kubeClient.AppsV1().Deployments(veleroDeploy.Namespace).Patch(context.Background(), veleroDeploy.Name, types.MergePatchType, patchBytes, metav1.PatchOptions{})
cmd.CheckError(err)
},
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/cli/repo/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ func NewGetCommand(f client.Factory, use string) *cobra.Command {
if len(args) > 0 {
repos = new(api.BackupRepositoryList)
for _, name := range args {
repo, err := veleroClient.VeleroV1().BackupRepositories(f.Namespace()).Get(context.TODO(), name, metav1.GetOptions{})
repo, err := veleroClient.VeleroV1().BackupRepositories(f.Namespace()).Get(context.Background(), name, metav1.GetOptions{})
cmd.CheckError(err)
repos.Items = append(repos.Items, *repo)
}
} else {
repos, err = veleroClient.VeleroV1().BackupRepositories(f.Namespace()).List(context.TODO(), listOptions)
repos, err = veleroClient.VeleroV1().BackupRepositories(f.Namespace()).List(context.Background(), listOptions)
cmd.CheckError(err)
}

Expand Down
8 changes: 4 additions & 4 deletions pkg/cmd/cli/restore/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,12 @@ func (o *CreateOptions) Validate(c *cobra.Command, args []string, f client.Facto
switch {
case o.BackupName != "":
backup := new(api.Backup)
if err := o.client.Get(context.TODO(), kbclient.ObjectKey{Namespace: f.Namespace(), Name: o.BackupName}, backup); err != nil {
if err := o.client.Get(context.Background(), kbclient.ObjectKey{Namespace: f.Namespace(), Name: o.BackupName}, backup); err != nil {
return err
}
case o.ScheduleName != "":
backupList := new(api.BackupList)
err := o.client.List(context.TODO(), backupList, &kbclient.ListOptions{
err := o.client.List(context.Background(), backupList, &kbclient.ListOptions{
LabelSelector: labels.SelectorFromSet(map[string]string{api.ScheduleNameLabel: o.ScheduleName}),
Namespace: f.Namespace(),
})
Expand Down Expand Up @@ -259,7 +259,7 @@ func (o *CreateOptions) Run(c *cobra.Command, f client.Factory) error {
// to restore from.
if o.ScheduleName != "" && boolptr.IsSetToTrue(o.AllowPartiallyFailed.Value) {
backupList := new(api.BackupList)
err := o.client.List(context.TODO(), backupList, &kbclient.ListOptions{
err := o.client.List(context.Background(), backupList, &kbclient.ListOptions{
LabelSelector: labels.SelectorFromSet(map[string]string{api.ScheduleNameLabel: o.ScheduleName}),
Namespace: f.Namespace(),
})
Expand Down Expand Up @@ -369,7 +369,7 @@ func (o *CreateOptions) Run(c *cobra.Command, f client.Factory) error {
go restoreInformer.Run(stop)
}

err := o.client.Create(context.TODO(), restore, &kbclient.CreateOptions{})
err := o.client.Create(context.Background(), restore, &kbclient.CreateOptions{})
if err != nil {
return err
}
Expand Down
Loading

0 comments on commit 1d185bf

Please sign in to comment.