Merge pull request #6290 from seanlaii/fix-ST1005

Fix lint issue ST1005
This commit is contained in:
karmada-bot 2025-04-14 09:12:00 +08:00 committed by GitHub
commit 83a4bb853a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 2 additions and 3 deletions

View File

@ -70,7 +70,6 @@ linters:
# Will fix the issues in the following PRs.
# Issue: https://github.com/karmada-io/karmada/issues/6273.
- "-QF1008"
- "-ST1005"
- "-ST1011"
- "-QF1001"
- "-ST1000"

View File

@ -117,7 +117,7 @@ func generateCMDs(module string) ([]*cobra.Command, error) {
cmds = append(cmds, webhookapp.NewWebhookCommand(context.TODO()))
cmds = append(cmds, adapterapp.NewMetricsAdapterCommand(context.TODO()))
default:
return nil, fmt.Errorf("Module %s is not supported", module)
return nil, fmt.Errorf("module %s is not supported", module)
}
return cmds, nil

View File

@ -233,7 +233,7 @@ func (c *FHPAController) reconcileAutoscaler(ctx context.Context, hpa *autoscali
if err := c.updateStatusIfNeeded(ctx, hpaStatusOriginal, hpa); err != nil {
utilruntime.HandleError(err)
}
return fmt.Errorf("Failed to get scale target reference: %v ", err)
return fmt.Errorf("failed to get scale target reference: %v ", err)
}
binding, err := c.getBindingByLabel(ctx, targetResource.GetLabels(), hpa.Spec.ScaleTargetRef)