Skip to content

Commit 9b67037

Browse files
Bump github.com/golangci/golangci-lint from 1.50.1 to 1.52.1 (#1164)
Signed-off-by: Prajyot-Parab <[email protected]>
1 parent d523cf1 commit 9b67037

26 files changed

+233
-258
lines changed

api/v1beta1/ibmvpc_conversion.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ func Convert_v1beta2_IBMVPCMachineSpec_To_v1beta1_IBMVPCMachineSpec(in *infrav1b
196196
return autoConvert_v1beta2_IBMVPCMachineSpec_To_v1beta1_IBMVPCMachineSpec(in, out, s)
197197
}
198198

199-
func Convert_Slice_Pointer_string_To_Slice_Pointer_v1beta2_IBMVPCResourceReference(in *[]*string, out *[]*infrav1beta2.IBMVPCResourceReference, s apiconversion.Scope) error {
199+
func Convert_Slice_Pointer_string_To_Slice_Pointer_v1beta2_IBMVPCResourceReference(in *[]*string, out *[]*infrav1beta2.IBMVPCResourceReference, _ apiconversion.Scope) error {
200200
for _, sshKey := range *in {
201201
*out = append(*out, &infrav1beta2.IBMVPCResourceReference{
202202
ID: sshKey,
@@ -205,7 +205,7 @@ func Convert_Slice_Pointer_string_To_Slice_Pointer_v1beta2_IBMVPCResourceReferen
205205
return nil
206206
}
207207

208-
func Convert_Slice_Pointer_v1beta2_IBMVPCResourceReference_To_Slice_Pointer_string(in *[]*infrav1beta2.IBMVPCResourceReference, out *[]*string, s apiconversion.Scope) error {
208+
func Convert_Slice_Pointer_v1beta2_IBMVPCResourceReference_To_Slice_Pointer_string(in *[]*infrav1beta2.IBMVPCResourceReference, out *[]*string, _ apiconversion.Scope) error {
209209
if in != nil {
210210
for _, sshKey := range *in {
211211
if sshKey.ID != nil {

api/v1beta2/ibmpowervscluster_webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func (r *IBMPowerVSCluster) ValidateCreate() error {
5757
}
5858

5959
// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
60-
func (r *IBMPowerVSCluster) ValidateUpdate(old runtime.Object) error {
60+
func (r *IBMPowerVSCluster) ValidateUpdate(_ runtime.Object) error {
6161
ibmpowervsclusterlog.Info("validate update", "name", r.Name)
6262
return r.validateIBMPowerVSCluster()
6363
}

api/v1beta2/ibmpowervsimage_webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func (r *IBMPowerVSImage) ValidateCreate() error {
5454
}
5555

5656
// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
57-
func (r *IBMPowerVSImage) ValidateUpdate(old runtime.Object) error {
57+
func (r *IBMPowerVSImage) ValidateUpdate(_ runtime.Object) error {
5858
ibmpowervsimagelog.Info("validate update", "name", r.Name)
5959
return nil
6060
}

api/v1beta2/ibmpowervsmachine_webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func (r *IBMPowerVSMachine) ValidateCreate() error {
5757
}
5858

5959
// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
60-
func (r *IBMPowerVSMachine) ValidateUpdate(old runtime.Object) error {
60+
func (r *IBMPowerVSMachine) ValidateUpdate(_ runtime.Object) error {
6161
ibmpowervsmachinelog.Info("validate update", "name", r.Name)
6262
return r.validateIBMPowerVSMachine()
6363
}

api/v1beta2/ibmpowervsmachinetemplate_webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func (r *IBMPowerVSMachineTemplate) ValidateCreate() error {
5757
}
5858

5959
// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
60-
func (r *IBMPowerVSMachineTemplate) ValidateUpdate(old runtime.Object) error {
60+
func (r *IBMPowerVSMachineTemplate) ValidateUpdate(_ runtime.Object) error {
6161
ibmpowervsmachinetemplatelog.Info("validate update", "name", r.Name)
6262
return r.validateIBMPowerVSMachineTemplate()
6363
}

api/v1beta2/ibmvpccluster_webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func (r *IBMVPCCluster) ValidateCreate() error {
5454
}
5555

5656
// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
57-
func (r *IBMVPCCluster) ValidateUpdate(old runtime.Object) error {
57+
func (r *IBMVPCCluster) ValidateUpdate(_ runtime.Object) error {
5858
ibmvpcclusterlog.Info("validate update", "name", r.Name)
5959
return nil
6060
}

api/v1beta2/ibmvpcmachine_webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func (r *IBMVPCMachine) ValidateCreate() error {
6060
}
6161

6262
// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
63-
func (r *IBMVPCMachine) ValidateUpdate(old runtime.Object) error {
63+
func (r *IBMVPCMachine) ValidateUpdate(_ runtime.Object) error {
6464
ibmvpcmachinelog.Info("validate update", "name", r.Name)
6565
return nil
6666
}

api/v1beta2/ibmvpcmachinetemplate_webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func (r *IBMVPCMachineTemplate) ValidateCreate() error {
5959
}
6060

6161
// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
62-
func (r *IBMVPCMachineTemplate) ValidateUpdate(old runtime.Object) error {
62+
func (r *IBMVPCMachineTemplate) ValidateUpdate(_ runtime.Object) error {
6363
ibmvpcmachinetemplatelog.Info("validate update", "name", r.Name)
6464
return nil
6565
}

cmd/capibmadm/cmd/powervs/image/list.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import (
2828

2929
logf "sigs.k8s.io/cluster-api/cmd/clusterctl/log"
3030

31-
"sigs.k8s.io/cluster-api-provider-ibmcloud/cmd/capibmadm/clients/iam"
3231
"sigs.k8s.io/cluster-api-provider-ibmcloud/cmd/capibmadm/clients/powervs"
3332
"sigs.k8s.io/cluster-api-provider-ibmcloud/cmd/capibmadm/options"
3433
"sigs.k8s.io/cluster-api-provider-ibmcloud/cmd/capibmadm/printer"
@@ -45,10 +44,7 @@ func ListCommand() *cobra.Command {
4544
export IBMCLOUD_API_KEY=<api-key>
4645
capibmadm powervs image list --service-instance-id <service-instance-id> --zone <zone>`,
4746
RunE: func(cmd *cobra.Command, args []string) error {
48-
if err := listimage(cmd.Context()); err != nil {
49-
return err
50-
}
51-
return nil
47+
return listimage(cmd.Context())
5248
},
5349
}
5450
options.AddCommonFlags(cmd)
@@ -59,8 +55,7 @@ func listimage(ctx context.Context) error {
5955
log := logf.Log
6056
log.Info("Listing PowerVS images", "service-instance-id", options.GlobalOptions.ServiceInstanceID)
6157

62-
auth := iam.GetIAMAuth()
63-
accountID, err := utils.GetAccountID(ctx, auth)
58+
accountID, err := utils.GetAccountID(ctx)
6459
if err != nil {
6560
return err
6661
}

cmd/capibmadm/cmd/powervs/key/create.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import (
2929

3030
"sigs.k8s.io/cluster-api/cmd/clusterctl/log"
3131

32-
"sigs.k8s.io/cluster-api-provider-ibmcloud/cmd/capibmadm/clients/iam"
3332
"sigs.k8s.io/cluster-api-provider-ibmcloud/cmd/capibmadm/clients/powervs"
3433
"sigs.k8s.io/cluster-api-provider-ibmcloud/cmd/capibmadm/options"
3534
"sigs.k8s.io/cluster-api-provider-ibmcloud/cmd/capibmadm/utils"
@@ -89,8 +88,7 @@ func createSSHKey(ctx context.Context, keyCreateOption keyCreateOptions) error {
8988
logger := log.Log
9089
logger.Info("Creating SSH key...")
9190

92-
auth := iam.GetIAMAuth()
93-
accountID, err := utils.GetAccountID(ctx, auth)
91+
accountID, err := utils.GetAccountID(ctx)
9492
if err != nil {
9593
return err
9694
}

0 commit comments

Comments
 (0)