Better var names (#2848)

Signed-off-by: Carlisia <carlisia@vmware.com>
This commit is contained in:
Carlisia Campos
2020-08-24 15:14:07 -04:00
committed by GitHub
parent f5d10c5474
commit 03bd6c85c8
2 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -172,12 +172,12 @@ func (o *CreateOptions) Run(c *cobra.Command, f client.Factory) error {
return err
}
client, err := f.KubebuilderClient()
kbClient, err := f.KubebuilderClient()
if err != nil {
return err
}
if err := client.Create(context.Background(), backupStorageLocation, &kbclient.CreateOptions{}); err != nil {
if err := kbClient.Create(context.Background(), backupStorageLocation, &kbclient.CreateOptions{}); err != nil {
return errors.WithStack(err)
}
+5 -5
View File
@@ -19,11 +19,11 @@ package backuplocation
import (
"context"
kbclient "sigs.k8s.io/controller-runtime/pkg/client"
"github.com/spf13/cobra"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
kbclient "sigs.k8s.io/controller-runtime/pkg/client"
velerov1api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
"github.com/vmware-tanzu/velero/pkg/client"
"github.com/vmware-tanzu/velero/pkg/cmd"
@@ -40,14 +40,14 @@ func NewGetCommand(f client.Factory, use string) *cobra.Command {
err := output.ValidateFlags(c)
cmd.CheckError(err)
client, err := f.KubebuilderClient()
kbClient, err := f.KubebuilderClient()
cmd.CheckError(err)
locations := new(velerov1api.BackupStorageLocationList)
if len(args) > 0 {
location := &velerov1api.BackupStorageLocation{}
for _, name := range args {
err = client.Get(context.Background(), kbclient.ObjectKey{
err = kbClient.Get(context.Background(), kbclient.ObjectKey{
Namespace: f.Namespace(),
Name: name,
}, location)
@@ -55,7 +55,7 @@ func NewGetCommand(f client.Factory, use string) *cobra.Command {
locations.Items = append(locations.Items, *location)
}
} else {
err := client.List(context.Background(), locations, &kbclient.ListOptions{
err := kbClient.List(context.Background(), locations, &kbclient.ListOptions{
Namespace: f.Namespace(),
})
cmd.CheckError(err)