Skip to content

Commit d1ec32a

Browse files
authored
Merge pull request #7450 from oscr/enable-revive-unused
✨ Enable revive linter unused-parameter and fix all findings
2 parents ea4879a + 1d514cb commit d1ec32a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+102
-102
lines changed

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ linters-settings:
176176
- name: errorf
177177
- name: empty-block
178178
- name: superfluous-else
179-
#- name: unused-parameter # TODO This is a recommended rule with many findings which may require it's own pr.
179+
- name: unused-parameter
180180
- name: unreachable-code
181181
- name: redefines-builtin-id
182182
#

api/v1alpha3/conversion.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,13 +277,13 @@ func (dst *MachineHealthCheckList) ConvertFrom(srcRaw conversion.Hub) error {
277277
return Convert_v1beta1_MachineHealthCheckList_To_v1alpha3_MachineHealthCheckList(src, dst, nil)
278278
}
279279

280-
func Convert_v1beta1_MachineSetStatus_To_v1alpha3_MachineSetStatus(in *clusterv1.MachineSetStatus, out *MachineSetStatus, s apiconversion.Scope) error {
280+
func Convert_v1beta1_MachineSetStatus_To_v1alpha3_MachineSetStatus(in *clusterv1.MachineSetStatus, out *MachineSetStatus, _ apiconversion.Scope) error {
281281
// Status.Conditions was introduced in v1alpha4, thus requiring a custom conversion function; the values is going to be preserved in an annotation thus allowing roundtrip without loosing informations
282282
return autoConvert_v1beta1_MachineSetStatus_To_v1alpha3_MachineSetStatus(in, out, nil)
283283
}
284284

285285
func Convert_v1beta1_ClusterSpec_To_v1alpha3_ClusterSpec(in *clusterv1.ClusterSpec, out *ClusterSpec, s apiconversion.Scope) error {
286-
// NOTE: custom conversion func is required because spec.Topology does not exists in v1alpha3
286+
// NOTE: custom conversion func is required because spec.Topology does not exist in v1alpha3
287287
return autoConvert_v1beta1_ClusterSpec_To_v1alpha3_ClusterSpec(in, out, s)
288288
}
289289

bootstrap/kubeadm/api/v1alpha3/conversion_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ func clusterConfigurationFuzzer(obj *upstreamv1beta1.ClusterConfiguration, c fuz
8282
obj.UseHyperKubeImage = false
8383
}
8484

85-
func kubeadmBootstrapTokenStringFuzzerV1UpstreamBeta1(in *upstreamv1beta1.BootstrapTokenString, c fuzz.Continue) {
85+
func kubeadmBootstrapTokenStringFuzzerV1UpstreamBeta1(in *upstreamv1beta1.BootstrapTokenString, _ fuzz.Continue) {
8686
in.ID = "abcdef"
8787
in.Secret = "abcdef0123456789"
8888
}
8989

90-
func kubeadmBootstrapTokenStringFuzzerV1Beta1(in *bootstrapv1.BootstrapTokenString, c fuzz.Continue) {
90+
func kubeadmBootstrapTokenStringFuzzerV1Beta1(in *bootstrapv1.BootstrapTokenString, _ fuzz.Continue) {
9191
in.ID = "abcdef"
9292
in.Secret = "abcdef0123456789"
9393
}

bootstrap/kubeadm/api/v1alpha4/conversion_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,17 @@ func clusterConfigurationFuzzer(obj *upstreamv1beta1.ClusterConfiguration, c fuz
8080
obj.UseHyperKubeImage = false
8181
}
8282

83-
func kubeadmBootstrapTokenStringFuzzerV1UpstreamBeta1(in *upstreamv1beta1.BootstrapTokenString, c fuzz.Continue) {
83+
func kubeadmBootstrapTokenStringFuzzerV1UpstreamBeta1(in *upstreamv1beta1.BootstrapTokenString, _ fuzz.Continue) {
8484
in.ID = fakeID
8585
in.Secret = fakeSecret
8686
}
8787

88-
func kubeadmBootstrapTokenStringFuzzerV1Beta1(in *bootstrapv1.BootstrapTokenString, c fuzz.Continue) {
88+
func kubeadmBootstrapTokenStringFuzzerV1Beta1(in *bootstrapv1.BootstrapTokenString, _ fuzz.Continue) {
8989
in.ID = fakeID
9090
in.Secret = fakeSecret
9191
}
9292

93-
func kubeadmBootstrapTokenStringFuzzerV1Alpha4(in *BootstrapTokenString, c fuzz.Continue) {
93+
func kubeadmBootstrapTokenStringFuzzerV1Alpha4(in *BootstrapTokenString, _ fuzz.Continue) {
9494
in.ID = fakeID
9595
in.Secret = fakeSecret
9696
}

bootstrap/kubeadm/api/v1beta1/kubeadmconfig_webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func (c *KubeadmConfig) ValidateCreate() error {
7070
}
7171

7272
// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
73-
func (c *KubeadmConfig) ValidateUpdate(old runtime.Object) error {
73+
func (c *KubeadmConfig) ValidateUpdate(_ runtime.Object) error {
7474
return c.Spec.validate(c.Name)
7575
}
7676

bootstrap/kubeadm/api/v1beta1/kubeadmconfigtemplate_webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func (r *KubeadmConfigTemplate) ValidateCreate() error {
4949
}
5050

5151
// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
52-
func (r *KubeadmConfigTemplate) ValidateUpdate(old runtime.Object) error {
52+
func (r *KubeadmConfigTemplate) ValidateUpdate(_ runtime.Object) error {
5353
return r.Spec.validate(r.Name)
5454
}
5555

cmd/clusterctl/client/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import (
3838
)
3939

4040
// TestNewFakeClient is a fake test to document fakeClient usage.
41-
func TestNewFakeClient(t *testing.T) {
41+
func TestNewFakeClient(_ *testing.T) {
4242
// create a fake config with a provider named P1 and a variable named var
4343
repository1Config := config.NewProvider("p1", "url", clusterctlv1.CoreProviderType)
4444

cmd/clusterctl/client/cluster/internal/dryrun/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ func (c *Client) Delete(ctx context.Context, obj client.Object, opts ...client.D
248248

249249
// Update updates the given obj in the internal object tracker.
250250
// NOTE: Topology reconciler does not use update, so we are skipping implementation for now.
251-
func (c *Client) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error {
251+
func (c *Client) Update(_ context.Context, _ client.Object, _ ...client.UpdateOption) error {
252252
panic("Update method is not supported by the dryrun client")
253253
}
254254

@@ -284,7 +284,7 @@ func (c *Client) Patch(ctx context.Context, obj client.Object, patch client.Patc
284284

285285
// DeleteAllOf deletes all objects of the given type matching the given options.
286286
// NOTE: Topology reconciler does not use DeleteAllOf, so we are skipping implementation for now.
287-
func (c *Client) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error {
287+
func (c *Client) DeleteAllOf(_ context.Context, _ client.Object, _ ...client.DeleteAllOfOption) error {
288288
panic("DeleteAllOf method is not supported by the dryrun client")
289289
}
290290

cmd/clusterctl/client/cluster/inventory_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import (
3131
"sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test"
3232
)
3333

34-
func fakePollImmediateWaiter(interval, timeout time.Duration, condition wait.ConditionFunc) error {
34+
func fakePollImmediateWaiter(_, _ time.Duration, _ wait.ConditionFunc) error {
3535
return nil
3636
}
3737

cmd/clusterctl/client/cluster/topology.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -631,9 +631,9 @@ func filterObjects(objs []*unstructured.Unstructured, gvks ...schema.GroupVersio
631631

632632
type noOpRecorder struct{}
633633

634-
func (nr *noOpRecorder) Event(_ runtime.Object, _, _, _ string) {}
635-
func (nr *noOpRecorder) Eventf(_ runtime.Object, _, _, _ string, args ...interface{}) {}
636-
func (nr *noOpRecorder) AnnotatedEventf(_ runtime.Object, _ map[string]string, _, _, _ string, args ...interface{}) {
634+
func (nr *noOpRecorder) Event(_ runtime.Object, _, _, _ string) {}
635+
func (nr *noOpRecorder) Eventf(_ runtime.Object, _, _, _ string, _ ...interface{}) {}
636+
func (nr *noOpRecorder) AnnotatedEventf(_ runtime.Object, _ map[string]string, _, _, _ string, _ ...interface{}) {
637637
}
638638

639639
func objToRef(o *unstructured.Unstructured) *corev1.ObjectReference {

cmd/clusterctl/client/cluster/topology_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,11 +349,11 @@ func (m *topologyPlanOutputItemMatcher) Match(actual interface{}) (bool, error)
349349
return true, nil
350350
}
351351

352-
func (m *topologyPlanOutputItemMatcher) FailureMessage(actual interface{}) string {
352+
func (m *topologyPlanOutputItemMatcher) FailureMessage(_ interface{}) string {
353353
return fmt.Sprintf("Expected item Kind=%s, Namespace=%s, Name(prefix)=%s to be present", m.kind, m.namespace, m.namePrefix)
354354
}
355355

356-
func (m *topologyPlanOutputItemMatcher) NegatedFailureMessage(actual interface{}) string {
356+
func (m *topologyPlanOutputItemMatcher) NegatedFailureMessage(_ interface{}) string {
357357
return fmt.Sprintf("Expected item Kind=%s, Namespace=%s, Name(prefix)=%s not to be present", m.kind, m.namespace, m.namePrefix)
358358
}
359359

cmd/clusterctl/client/clusterclass_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,10 @@ func (cm *clusterClassMatcher) Match(actual interface{}) (bool, error) {
258258
return true, nil
259259
}
260260

261-
func (cm *clusterClassMatcher) FailureMessage(actual interface{}) string {
261+
func (cm *clusterClassMatcher) FailureMessage(_ interface{}) string {
262262
return fmt.Sprintf("Expected ClusterClass of name %v in namespace %v to be present", cm.name, cm.namespace)
263263
}
264264

265-
func (cm *clusterClassMatcher) NegatedFailureMessage(actual interface{}) string {
265+
func (cm *clusterClassMatcher) NegatedFailureMessage(_ interface{}) string {
266266
return fmt.Sprintf("Expected ClusterClass of name %v in namespace %v not to be present", cm.name, cm.namespace)
267267
}

cmd/clusterctl/client/config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1046,6 +1046,6 @@ v3: default3`,
10461046
// errReader returns a non-EOF error on the first read.
10471047
type errReader struct{}
10481048

1049-
func (e *errReader) Read(p []byte) (n int, err error) {
1049+
func (e *errReader) Read(_ []byte) (n int, err error) {
10501050
return 0, errors.New("read error")
10511051
}

cmd/clusterctl/client/move_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -298,22 +298,22 @@ type fakeObjectMover struct {
298298
fromDirectoryErr error
299299
}
300300

301-
func (f *fakeObjectMover) Move(namespace string, toCluster cluster.Client, dryRun bool) error {
301+
func (f *fakeObjectMover) Move(_ string, _ cluster.Client, _ bool) error {
302302
return f.moveErr
303303
}
304304

305-
func (f *fakeObjectMover) ToDirectory(namespace string, directory string) error {
305+
func (f *fakeObjectMover) ToDirectory(_ string, _ string) error {
306306
return f.toDirectoryErr
307307
}
308308

309-
func (f *fakeObjectMover) Backup(namespace string, directory string) error {
309+
func (f *fakeObjectMover) Backup(_ string, _ string) error {
310310
return f.toDirectoryErr
311311
}
312312

313-
func (f *fakeObjectMover) FromDirectory(toCluster cluster.Client, directory string) error {
313+
func (f *fakeObjectMover) FromDirectory(_ cluster.Client, _ string) error {
314314
return f.fromDirectoryErr
315315
}
316316

317-
func (f *fakeObjectMover) Restore(toCluster cluster.Client, directory string) error {
317+
func (f *fakeObjectMover) Restore(_ cluster.Client, _ string) error {
318318
return f.fromDirectoryErr
319319
}

cmd/clusterctl/internal/test/fake_processor.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,22 @@ func (fp *FakeProcessor) WithProcessErr(e error) *FakeProcessor {
4444
return fp
4545
}
4646

47-
func (fp *FakeProcessor) GetTemplateName(version, flavor string) string {
47+
func (fp *FakeProcessor) GetTemplateName(_, _ string) string {
4848
return fp.artifactName
4949
}
5050

51-
func (fp *FakeProcessor) GetClusterClassTemplateName(version, name string) string {
51+
func (fp *FakeProcessor) GetClusterClassTemplateName(_, name string) string {
5252
return fmt.Sprintf("clusterclass-%s.yaml", name)
5353
}
5454

55-
func (fp *FakeProcessor) GetVariables(raw []byte) ([]string, error) {
55+
func (fp *FakeProcessor) GetVariables(_ []byte) ([]string, error) {
5656
return nil, fp.errGetVariables
5757
}
5858

59-
func (fp *FakeProcessor) GetVariableMap(raw []byte) (map[string]*string, error) {
59+
func (fp *FakeProcessor) GetVariableMap(_ []byte) (map[string]*string, error) {
6060
return nil, fp.errGetVariableMap
6161
}
6262

63-
func (fp *FakeProcessor) Process(raw []byte, variablesGetter func(string) (string, error)) ([]byte, error) {
63+
func (fp *FakeProcessor) Process(_ []byte, _ func(string) (string, error)) ([]byte, error) {
6464
return nil, fp.errProcess
6565
}

cmd/clusterctl/internal/test/fake_proxy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@ func (f *FakeProxy) ListResources(labels map[string]string, namespaces ...string
136136
return ret, nil
137137
}
138138

139-
func (f *FakeProxy) GetContexts(prefix string) ([]string, error) {
139+
func (f *FakeProxy) GetContexts(_ string) ([]string, error) {
140140
return nil, nil
141141
}
142142

143-
func (f *FakeProxy) GetResourceNames(groupVersion, kind string, options []client.ListOption, prefix string) ([]string, error) {
143+
func (f *FakeProxy) GetResourceNames(_, _ string, _ []client.ListOption, _ string) ([]string, error) {
144144
return nil, nil
145145
}
146146

cmd/clusterctl/internal/test/fake_reader.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ type imageMeta struct {
5555
Tag string `json:"tag,omitempty"`
5656
}
5757

58-
func (f *FakeReader) Init(config string) error {
58+
func (f *FakeReader) Init(_ string) error {
5959
f.initialized = true
6060
return nil
6161
}

cmd/clusterctl/log/logger.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ type logger struct {
6767

6868
var _ logr.LogSink = &logger{}
6969

70-
func (l *logger) Init(info logr.RuntimeInfo) {
70+
func (l *logger) Init(_ logr.RuntimeInfo) {
7171
}
7272

7373
// Enabled tests whether this Logger is enabled.

controllers/remote/fake/cluster.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ import (
2525

2626
// NewClusterClient returns the same client passed as input, as output. It is assumed that the client is a
2727
// fake controller-runtime client.
28-
func NewClusterClient(_ context.Context, sourceName string, c client.Client, _ client.ObjectKey) (client.Client, error) {
28+
func NewClusterClient(_ context.Context, _ string, c client.Client, _ client.ObjectKey) (client.Client, error) {
2929
return c, nil
3030
}

controlplane/kubeadm/api/v1alpha3/conversion_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ func fuzzFuncs(_ runtimeserializer.CodecFactory) []interface{} {
5656
}
5757
}
5858

59-
func kubeadmBootstrapTokenStringFuzzer(in *upstreamv1beta1.BootstrapTokenString, c fuzz.Continue) {
59+
func kubeadmBootstrapTokenStringFuzzer(in *upstreamv1beta1.BootstrapTokenString, _ fuzz.Continue) {
6060
in.ID = "abcdef"
6161
in.Secret = "abcdef0123456789"
6262
}
63-
func cabpkBootstrapTokenStringFuzzer(in *bootstrapv1.BootstrapTokenString, c fuzz.Continue) {
63+
func cabpkBootstrapTokenStringFuzzer(in *bootstrapv1.BootstrapTokenString, _ fuzz.Continue) {
6464
in.ID = "abcdef"
6565
in.Secret = "abcdef0123456789"
6666
}

controlplane/kubeadm/api/v1alpha4/conversion_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,24 +71,24 @@ func fuzzFuncs(_ runtimeserializer.CodecFactory) []interface{} {
7171
}
7272
}
7373

74-
func kubeadmBootstrapTokenStringFuzzer(in *upstreamv1beta1.BootstrapTokenString, c fuzz.Continue) {
74+
func kubeadmBootstrapTokenStringFuzzer(in *upstreamv1beta1.BootstrapTokenString, _ fuzz.Continue) {
7575
in.ID = fakeID
7676
in.Secret = fakeSecret
7777
}
7878

79-
func cabpkBootstrapTokenStringFuzzer(in *bootstrapv1.BootstrapTokenString, c fuzz.Continue) {
79+
func cabpkBootstrapTokenStringFuzzer(in *bootstrapv1.BootstrapTokenString, _ fuzz.Continue) {
8080
in.ID = fakeID
8181
in.Secret = fakeSecret
8282
}
8383

8484
func dnsFuzzer(obj *upstreamv1beta1.DNS, c fuzz.Continue) {
8585
c.FuzzNoCustom(obj)
8686

87-
// DNS.Type does not exists in v1alpha4, so setting it to empty string in order to avoid v1alpha3 --> v1alpha4 --> v1alpha3 round trip errors.
87+
// DNS.Type does not exist in v1alpha4, so setting it to empty string in order to avoid v1alpha3 --> v1alpha4 --> v1alpha3 round trip errors.
8888
obj.Type = ""
8989
}
9090

91-
func kubeadmBootstrapTokenStringFuzzerV1Alpha4(in *bootstrapv1alpha4.BootstrapTokenString, c fuzz.Continue) {
91+
func kubeadmBootstrapTokenStringFuzzerV1Alpha4(in *bootstrapv1alpha4.BootstrapTokenString, _ fuzz.Continue) {
9292
in.ID = fakeID
9393
in.Secret = fakeSecret
9494
}

controlplane/kubeadm/internal/cluster_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ type fakeClient struct {
291291
listErr error
292292
}
293293

294-
func (f *fakeClient) Get(_ context.Context, key client.ObjectKey, obj client.Object, opts ...client.GetOption) error {
294+
func (f *fakeClient) Get(_ context.Context, key client.ObjectKey, obj client.Object, _ ...client.GetOption) error {
295295
f.getCalled = true
296296
if f.getErr != nil {
297297
return f.getErr

controlplane/kubeadm/internal/controllers/fakes_test.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func (f fakeWorkloadCluster) ForwardEtcdLeadership(_ context.Context, _ *cluster
8080
return nil
8181
}
8282

83-
func (f fakeWorkloadCluster) ReconcileEtcdMembers(ctx context.Context, nodeNames []string, version semver.Version) ([]string, error) {
83+
func (f fakeWorkloadCluster) ReconcileEtcdMembers(_ context.Context, _ []string, _ semver.Version) ([]string, error) {
8484
return nil, nil
8585
}
8686

@@ -92,35 +92,35 @@ func (f fakeWorkloadCluster) GetAPIServerCertificateExpiry(_ context.Context, _
9292
return f.APIServerCertificateExpiry, nil
9393
}
9494

95-
func (f fakeWorkloadCluster) AllowBootstrapTokensToGetNodes(ctx context.Context) error {
95+
func (f fakeWorkloadCluster) AllowBootstrapTokensToGetNodes(_ context.Context) error {
9696
return nil
9797
}
9898

99-
func (f fakeWorkloadCluster) ReconcileKubeletRBACRole(ctx context.Context, version semver.Version) error {
99+
func (f fakeWorkloadCluster) ReconcileKubeletRBACRole(_ context.Context, _ semver.Version) error {
100100
return nil
101101
}
102102

103-
func (f fakeWorkloadCluster) ReconcileKubeletRBACBinding(ctx context.Context, version semver.Version) error {
103+
func (f fakeWorkloadCluster) ReconcileKubeletRBACBinding(_ context.Context, _ semver.Version) error {
104104
return nil
105105
}
106106

107-
func (f fakeWorkloadCluster) UpdateKubernetesVersionInKubeadmConfigMap(ctx context.Context, version semver.Version) error {
107+
func (f fakeWorkloadCluster) UpdateKubernetesVersionInKubeadmConfigMap(_ context.Context, _ semver.Version) error {
108108
return nil
109109
}
110110

111-
func (f fakeWorkloadCluster) UpdateEtcdVersionInKubeadmConfigMap(ctx context.Context, imageRepository, imageTag string, version semver.Version) error {
111+
func (f fakeWorkloadCluster) UpdateEtcdVersionInKubeadmConfigMap(_ context.Context, _, _ string, _ semver.Version) error {
112112
return nil
113113
}
114114

115-
func (f fakeWorkloadCluster) UpdateKubeletConfigMap(ctx context.Context, version semver.Version) error {
115+
func (f fakeWorkloadCluster) UpdateKubeletConfigMap(_ context.Context, _ semver.Version) error {
116116
return nil
117117
}
118118

119-
func (f fakeWorkloadCluster) RemoveEtcdMemberForMachine(ctx context.Context, machine *clusterv1.Machine) error {
119+
func (f fakeWorkloadCluster) RemoveEtcdMemberForMachine(_ context.Context, _ *clusterv1.Machine) error {
120120
return nil
121121
}
122122

123-
func (f fakeWorkloadCluster) RemoveMachineFromKubeadmConfigMap(ctx context.Context, machine *clusterv1.Machine, version semver.Version) error {
123+
func (f fakeWorkloadCluster) RemoveMachineFromKubeadmConfigMap(_ context.Context, _ *clusterv1.Machine, _ semver.Version) error {
124124
return nil
125125
}
126126

@@ -134,7 +134,7 @@ type fakeMigrator struct {
134134
migratedCorefile string
135135
}
136136

137-
func (m *fakeMigrator) Migrate(current, to, corefile string, deprecations bool) (string, error) {
137+
func (m *fakeMigrator) Migrate(_, _, _ string, _ bool) (string, error) {
138138
m.migrateCalled = true
139139
if m.migrateErr != nil {
140140
return "", m.migrateErr

controlplane/kubeadm/internal/proxy/dial.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func (d *Dialer) DialContextWithAddr(ctx context.Context, addr string) (net.Conn
8484

8585
// DialContext creates proxied port-forwarded connections.
8686
// ctx is currently unused, but fulfils the type signature used by GRPC.
87-
func (d *Dialer) DialContext(_ context.Context, network string, addr string) (net.Conn, error) {
87+
func (d *Dialer) DialContext(_ context.Context, _ string, addr string) (net.Conn, error) {
8888
req := d.clientset.CoreV1().RESTClient().
8989
Post().
9090
Resource(d.proxy.Kind).

controlplane/kubeadm/internal/workload_cluster_conditions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func (w *Workload) UpdateEtcdConditions(ctx context.Context, controlPlane *Contr
4747
w.updateExternalEtcdConditions(ctx, controlPlane)
4848
}
4949

50-
func (w *Workload) updateExternalEtcdConditions(ctx context.Context, controlPlane *ControlPlane) { //nolint:unparam
50+
func (w *Workload) updateExternalEtcdConditions(_ context.Context, controlPlane *ControlPlane) {
5151
// When KCP is not responsible for external etcd, we are reporting only health at KCP level.
5252
conditions.MarkTrue(controlPlane.KCP, controlplanev1.EtcdClusterHealthyCondition)
5353

controlplane/kubeadm/internal/workload_cluster_coredns_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1639,7 +1639,7 @@ type fakeMigrator struct {
16391639
migratedCorefile string
16401640
}
16411641

1642-
func (m *fakeMigrator) Migrate(current, to, corefile string, deprecations bool) (string, error) {
1642+
func (m *fakeMigrator) Migrate(_, _, _ string, _ bool) (string, error) {
16431643
m.migrateCalled = true
16441644
if m.migrateErr != nil {
16451645
return "", m.migrateErr

0 commit comments

Comments
 (0)