Error string should not be capitalized or end with punctuation.

This commit is contained in:
maruiyan
2021-06-30 10:57:33 +08:00
parent 7ad7c0757a
commit 9c150b0f22
2 changed files with 28 additions and 28 deletions

View File

@@ -53,7 +53,7 @@ func deleteResource(c clientset.Interface, kind schema.GroupKind, namespace, nam
case api.Kind("Service"):
return c.CoreV1().Services(namespace).Delete(context.TODO(), name, options)
default:
return fmt.Errorf("Unsupported kind when deleting: %v", kind)
return fmt.Errorf("unsupported kind when deleting: %v", kind)
}
}
@@ -63,7 +63,7 @@ func DeleteResourceWithRetries(c clientset.Interface, kind schema.GroupKind, nam
if err == nil || apierrors.IsNotFound(err) {
return true, nil
}
return false, fmt.Errorf("Failed to delete object with non-retriable error: %v", err)
return false, fmt.Errorf("failed to delete object with non-retriable error: %v", err)
}
return RetryWithExponentialBackOff(deleteFunc)
}