mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-03 11:48:15 +00:00
Call-site comments: the "" arg to TooLong is unused
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user