Call-site comments: the "" arg to TooLong is unused

This commit is contained in:
Tim Hockin
2024-11-05 09:11:03 -08:00
parent 8a7af90300
commit c8eeb486f4
15 changed files with 33 additions and 33 deletions

View File

@@ -100,7 +100,7 @@ func validateParameters(params map[string]string, allowEmpty bool, fldPath *fiel
allErrs := field.ErrorList{}
if len(params) > maxProvisionerParameterLen {
allErrs = append(allErrs, field.TooLong(fldPath, "", maxProvisionerParameterLen))
allErrs = append(allErrs, field.TooLong(fldPath, "" /*unused*/, maxProvisionerParameterLen))
return allErrs
}
@@ -112,7 +112,7 @@ func validateParameters(params map[string]string, allowEmpty bool, fldPath *fiel
}
if totalSize > maxProvisionerParameterSize {
allErrs = append(allErrs, field.TooLong(fldPath, "", maxProvisionerParameterSize))
allErrs = append(allErrs, field.TooLong(fldPath, "" /*unused*/, maxProvisionerParameterSize))
}
if !allowEmpty && len(params) == 0 {
@@ -223,7 +223,7 @@ func validateAttachmentMetadata(metadata map[string]string, fldPath *field.Path)
size += (int64)(len(k)) + (int64)(len(v))
}
if size > maxAttachedVolumeMetadataSize {
allErrs = append(allErrs, field.TooLong(fldPath, "", maxAttachedVolumeMetadataSize))
allErrs = append(allErrs, field.TooLong(fldPath, "" /*unused*/, maxAttachedVolumeMetadataSize))
}
return allErrs
}
@@ -235,7 +235,7 @@ func validateVolumeError(e *storage.VolumeError, fldPath *field.Path) field.Erro
return allErrs
}
if len(e.Message) > maxVolumeErrorMessageSize {
allErrs = append(allErrs, field.TooLong(fldPath.Child("message"), "", maxAttachedVolumeMetadataSize))
allErrs = append(allErrs, field.TooLong(fldPath.Child("message"), "" /*unused*/, maxAttachedVolumeMetadataSize))
}
return allErrs
}