Skip to content

Commit

Permalink
fix: lint errors reported by golangci-lint
Browse files Browse the repository at this point in the history
Signed-off-by: Chetan Banavikalmutt <[email protected]>
  • Loading branch information
chetan-rns committed Mar 21, 2024
1 parent 1099f88 commit 3373745
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions cmd/rollouts-controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ func newCommand() *cobra.Command {
discoveryClient, err := discovery.NewDiscoveryClientForConfig(config)
checkError(err)
smiClient, err := smiclientset.NewForConfig(config)
checkError(err)
resyncDuration := time.Duration(rolloutResyncPeriod) * time.Second
kubeInformerFactory := kubeinformers.NewSharedInformerFactoryWithOptions(
kubeClient,
Expand Down
2 changes: 1 addition & 1 deletion controller/metrics/prommetrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ var (
MetricAnalysisTemplateInfo = prometheus.NewDesc(
"analysis_template_info",
"Information about analysis templates.",
append(namespaceNameLabels),
namespaceNameLabels,
nil,
)

Expand Down
3 changes: 0 additions & 3 deletions rollout/canary_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,6 @@ func TestRollBackToActiveReplicaSetWithinWindow(t *testing.T) {

f.kubeobjects = append(f.kubeobjects, rs1, rs2)
f.replicaSetLister = append(f.replicaSetLister, rs1, rs2)
f.serviceLister = append(f.serviceLister)

// Switch back to version 1
r2.Spec.Template = r1.Spec.Template
Expand Down Expand Up @@ -1567,8 +1566,6 @@ func TestCanaryRolloutWithInvalidPingServiceName(t *testing.T) {

f.rolloutLister = append(f.rolloutLister, r)
f.objects = append(f.objects, r)
f.kubeobjects = append(f.kubeobjects)
f.serviceLister = append(f.serviceLister)

patchIndex := f.expectPatchRolloutAction(r)
f.run(getKey(r, t))
Expand Down
1 change: 0 additions & 1 deletion rollout/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ func TestPreviewServiceNotFound(t *testing.T) {
activeSvc := newService("active-svc", 80, nil, nil)
notUsedPreviewSvc := newService("preview-svc", 80, nil, nil)
f.kubeobjects = append(f.kubeobjects, activeSvc)
f.serviceLister = append(f.serviceLister)

patchIndex := f.expectPatchRolloutAction(r)
f.run(getKey(r, t))
Expand Down

0 comments on commit 3373745

Please sign in to comment.