remove redundant err check and just return

This commit is contained in:
Laurence 2024-04-12 16:34:16 +01:00
parent 67c268d16c
commit 01edb183c4
No known key found for this signature in database
GPG key ID: B053BEE3478E8FEF

View file

@ -304,12 +304,7 @@ func collectPprof(h *http.Client, endpoint string) ([]byte, error) {
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil {
return nil, err
}
return body, nil
return io.ReadAll(resp.Body)
}
type cliSupport struct{}