gosimple: S1004
Signed-off-by: Jake Sanders <i@am.so-aweso.me>
This commit is contained in:
parent
aca56a7168
commit
e7219a155f
@ -42,7 +42,7 @@ func ValidateOrderUpdate(_ *admissionv1.AdmissionRequest, oldObj, newObj runtime
|
||||
|
||||
func ValidateOrderSpecUpdate(old, new cmacme.OrderSpec, fldPath *field.Path) field.ErrorList {
|
||||
el := field.ErrorList{}
|
||||
if len(old.Request) > 0 && bytes.Compare(old.Request, new.Request) != 0 {
|
||||
if len(old.Request) > 0 && !bytes.Equal(old.Request, new.Request) {
|
||||
el = append(el, field.Forbidden(fldPath.Child("request"), "field is immutable once set"))
|
||||
}
|
||||
return el
|
||||
@ -59,7 +59,7 @@ func ValidateOrderStatusUpdate(old, new cmacme.OrderStatus, fldPath *field.Path)
|
||||
el = append(el, field.Forbidden(fldPath.Child("finalizeURL"), "field is immutable once set"))
|
||||
}
|
||||
// once the Certificate has been issued, it cannot be changed
|
||||
if len(old.Certificate) > 0 && bytes.Compare(old.Certificate, new.Certificate) != 0 {
|
||||
if len(old.Certificate) > 0 && !bytes.Equal(old.Certificate, new.Certificate) {
|
||||
el = append(el, field.Forbidden(fldPath.Child("certificate"), "field is immutable once set"))
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user