style: remove redundant judgment

Signed-off-by: cndoit18 <cndoit18@outlook.com>
This commit is contained in:
cndoit18
2022-07-29 18:25:05 +08:00
parent 26842bb0c8
commit ec43037d0f
26 changed files with 26 additions and 112 deletions

View File

@@ -36,9 +36,5 @@ var SortingDeletionAgeRatio = metrics.NewHistogram(
// Register registers ReplicaSet controller metrics.
func Register(registrationFunc func(metrics.Registerable) error) error {
err := registrationFunc(SortingDeletionAgeRatio)
if err != nil {
return err
}
return nil
return registrationFunc(SortingDeletionAgeRatio)
}