Skip to content

Commit

Permalink
fixup! feat: Add golangci-lint
Browse files Browse the repository at this point in the history
Signed-off-by: Mateus Oliveira <[email protected]>
  • Loading branch information
mateusoliveira43 committed Feb 26, 2024
1 parent bad01d2 commit bc5e142
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions pkg/leaderelection/leaderelection.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ package leaderelection
import (
"context"
"fmt"
configv1 "github.com/openshift/api/config/v1"
"io/ioutil"
"math"
"strings"
"time"

configv1 "github.com/openshift/api/config/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/kubernetes/scheme"
"k8s.io/client-go/rest"
"k8s.io/klog/v2"
"math"
"sigs.k8s.io/controller-runtime/pkg/client"
"strings"
"time"
)

const infraResourceName = "cluster"
Expand Down Expand Up @@ -106,14 +107,14 @@ func GetClusterInfraStatus(restClient *rest.Config) (*configv1.InfrastructureSta
if err != nil {
return nil, err
}
client, err := client.New(restClient, client.Options{})
clientInstance, err := client.New(restClient, client.Options{})
if err != nil {
return nil, err
}

infra := &configv1.Infrastructure{}
key := types.NamespacedName{Name: infraResourceName}
if err = client.Get(context.TODO(), key, infra); err != nil {
if err = clientInstance.Get(context.TODO(), key, infra); err != nil {
return nil, err
}

Expand Down

0 comments on commit bc5e142

Please sign in to comment.