Skip to content

Commit 28aff5b

Browse files
synaretephlogistonjohn
authored andcommitted
build: fix 'make check' errors with go1.18.2
Fixed minor lint errors when compiling the code with go1.18.2 (amd64, RHEL8). Signed-off-by: Shachar Sharon <[email protected]>
1 parent 90bcf4b commit 28aff5b

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

controllers/smbshare_controller.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ func (r *SmbShareReconciler) Reconcile(
6262
reqLogger.Info("Reconciling SmbShare")
6363

6464
smbShareManager := resources.NewSmbShareManager(
65-
r, r.Scheme(), r.recorder, reqLogger)
65+
r, r.Scheme(), r.recorder, reqLogger) // nolint:typecheck
66+
6667
res := smbShareManager.Process(ctx, req.NamespacedName)
6768
err := res.Err()
6869
if res.Requeue() {
@@ -72,9 +73,7 @@ func (r *SmbShareReconciler) Reconcile(
7273
}
7374

7475
func (r *SmbShareReconciler) setRecorder(mgr ctrl.Manager) {
75-
if r.recorder == nil {
76-
r.recorder = mgr.GetEventRecorderFor("smbshare-controller")
77-
}
76+
r.recorder = mgr.GetEventRecorderFor("smbshare-controller")
7877
}
7978

8079
// SetupWithManager sets up resource management.

internal/resources/smbshare.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
kresource "k8s.io/apimachinery/pkg/api/resource"
2626
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2727
"k8s.io/apimachinery/pkg/runtime"
28-
"k8s.io/apimachinery/pkg/types"
28+
"k8s.io/apimachinery/pkg/types" // nolint:typecheck
2929
"k8s.io/client-go/tools/record"
3030
rtclient "sigs.k8s.io/controller-runtime/pkg/client"
3131
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"

tests/utils/kube/dynamic.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1212
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
1313
"k8s.io/apimachinery/pkg/runtime/schema"
14-
"k8s.io/apimachinery/pkg/types"
14+
"k8s.io/apimachinery/pkg/types" // nolint:typecheck
1515
"k8s.io/apimachinery/pkg/util/yaml"
1616
"k8s.io/client-go/discovery"
1717
"k8s.io/client-go/discovery/cached/memory"

tests/utils/kube/status.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func WaitForAnyPodReady(
119119
tc: tc,
120120
fetchOpts: fo,
121121
}
122-
pp.Cond = func() (bool, error) { return pp.checkReady(ctx) }
122+
pp.Prober.Cond = func() (bool, error) { return pp.checkReady(ctx) }
123123
return poll.TryUntil(ctx, pp)
124124
}
125125

@@ -133,7 +133,7 @@ func WaitForAllPodReady(
133133
tc: tc,
134134
fetchOpts: fo,
135135
}
136-
pp.Cond = func() (bool, error) { return pp.checkAllReady(ctx) }
136+
pp.Prober.Cond = func() (bool, error) { return pp.checkAllReady(ctx) }
137137
return poll.TryUntil(ctx, pp)
138138
}
139139

@@ -147,6 +147,6 @@ func WaitForAnyPodExists(
147147
tc: tc,
148148
fetchOpts: fo,
149149
}
150-
pp.Cond = func() (bool, error) { return pp.checkExists(ctx) }
150+
pp.Prober.Cond = func() (bool, error) { return pp.checkExists(ctx) }
151151
return poll.TryUntil(ctx, pp)
152152
}

0 commit comments

Comments
 (0)