Skip to content

Commit 5f6b35e

Browse files
committed
Fix lint issue
1 parent 011456e commit 5f6b35e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pkg/controller/elasticsearch/validation/webhook.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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.
7979
func (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

Comments
 (0)