@@ -78,7 +78,6 @@ func (wh *validatingWebhook) validateUpdate(ctx context.Context, prev esv1.Elast
7878// Handle is called when any request is sent to the webhook, satisfying the admission.Handler interface.
7979func (wh * validatingWebhook ) Handle (ctx context.Context , req admission.Request ) admission.Response {
8080 es := & esv1.Elasticsearch {}
81- warnings := ""
8281 err := wh .decoder .DecodeRaw (req .Object , es )
8382 if err != nil {
8483 return admission .Errored (http .StatusBadRequest , err )
@@ -92,7 +91,7 @@ func (wh *validatingWebhook) Handle(ctx context.Context, req admission.Request)
9291 }
9392
9493 if req .Operation == admissionv1 .Create {
95- warnings , err = wh .validateCreate (ctx , * es )
94+ warnings , err : = wh .validateCreate (ctx , * es )
9695 if err != nil {
9796 return admission .Denied (err .Error ())
9897 }
@@ -111,7 +110,7 @@ func (wh *validatingWebhook) Handle(ctx context.Context, req admission.Request)
111110 return admission .Errored (http .StatusBadRequest , err )
112111 }
113112
114- warnings , err = wh .validateUpdate (ctx , * oldObj , * es )
113+ warnings , err : = wh .validateUpdate (ctx , * oldObj , * es )
115114 if err != nil {
116115 return admission .Denied (err .Error ())
117116 }
0 commit comments