Fix null pointer (#57292)

pull/57299/head
Selene 3 years ago committed by GitHub
parent 717bd4a6c0
commit 8a35cb57fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      pkg/services/querylibrary/tests/api_client.go

@ -53,11 +53,12 @@ func (q *queryLibraryAPIClient) update(ctx context.Context, query *querylibrary.
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
defer func() {
_ = resp.Body.Close()
}()
if err != nil {
return err
}
return err
_ = resp.Body.Close()
return nil
}
func (q *queryLibraryAPIClient) delete(ctx context.Context, uid string) error {

Loading…
Cancel
Save