Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
chore: Fix golangci-lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmidyson committed Jul 2, 2020
1 parent 5061f18 commit 00d3951
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pkg/controller/kubefedcluster/clusterclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func NewClusterClientSet(c *fedv1b1.KubeFedCluster, client generic.Client, fedNa
if err != nil {
return nil, err
}
clusterConfig.Timeout = timeout
clusterConfig.Timeout = timeout //nolint:staticcheck
var clusterClientSet = ClusterClient{clusterName: c.Name}
if clusterConfig != nil {
clusterClientSet.kubeClient = kubeclientset.NewForConfigOrDie((restclient.AddUserAgent(clusterConfig, UserAgentName)))
Expand Down
3 changes: 1 addition & 2 deletions pkg/controller/kubefedcluster/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package kubefedcluster

import (
"context"
"fmt"
"sync"
"time"

Expand Down Expand Up @@ -111,7 +110,7 @@ func newClusterController(config *util.ControllerConfig, clusterHealthCheckConfi
kubeClient := kubeclient.NewForConfigOrDie(kubeConfig)
broadcaster := record.NewBroadcaster()
broadcaster.StartRecordingToSink(&typedcorev1.EventSinkImpl{Interface: kubeClient.CoreV1().Events("")})
recorder := broadcaster.NewRecorder(genscheme.Scheme, corev1.EventSource{Component: fmt.Sprintf("kubefedcluster-controller")})
recorder := broadcaster.NewRecorder(genscheme.Scheme, corev1.EventSource{Component: "kubefedcluster-controller"})
cc.eventRecorder = recorder

var err error
Expand Down
4 changes: 2 additions & 2 deletions pkg/controller/schedulingpreference/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func StartSchedulingPreferenceController(config *util.ControllerConfig, scheduli
if config.MinimizeLatency {
controller.minimizeLatency()
}
klog.Infof(fmt.Sprintf("Starting replicaschedulingpreferences controller"))
klog.Infof("Starting replicaschedulingpreferences controller")
controller.Run(stopChannel)
return controller.scheduler, nil
}
Expand All @@ -95,7 +95,7 @@ func newSchedulingPreferenceController(config *util.ControllerConfig, scheduling

broadcaster := record.NewBroadcaster()
broadcaster.StartRecordingToSink(&typedcorev1.EventSinkImpl{Interface: kubeClient.CoreV1().Events("")})
recorder := broadcaster.NewRecorder(scheme.Scheme, corev1.EventSource{Component: fmt.Sprintf("replicaschedulingpreference-controller")})
recorder := broadcaster.NewRecorder(scheme.Scheme, corev1.EventSource{Component: "replicaschedulingpreference-controller"})

s := &SchedulingPreferenceController{
clusterAvailableDelay: config.ClusterAvailableDelay,
Expand Down
5 changes: 1 addition & 4 deletions pkg/controller/sync/version/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,7 @@ func (m *VersionManager) Sync(stopChan <-chan struct{}) {
if !ok {
return
}
ok = m.load(versionList, stopChan)
if !ok {
return
}
m.load(versionList, stopChan)
}

// HasSynced indicates whether the manager's in-memory state has been
Expand Down

0 comments on commit 00d3951

Please sign in to comment.