mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-16 18:43:10 -06:00
All hail the mighty linter
This commit is contained in:
parent
ad0aaa92d1
commit
bfd776abf6
|
|
@ -181,13 +181,14 @@ func requestDo[T thirdpartyResponses](client *http.Client, url string, response
|
||||||
// try v1 and unstable appservice endpoints
|
// try v1 and unstable appservice endpoints
|
||||||
for _, version := range []string{"v1", "unstable"} {
|
for _, version := range []string{"v1", "unstable"} {
|
||||||
var resp *http.Response
|
var resp *http.Response
|
||||||
|
var body []byte
|
||||||
asURL := strings.Replace(origURL, "unstable", version, 1)
|
asURL := strings.Replace(origURL, "unstable", version, 1)
|
||||||
resp, err = client.Get(asURL)
|
resp, err = client.Get(asURL)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
defer resp.Body.Close() // nolint: errcheck
|
defer resp.Body.Close() // nolint: errcheck
|
||||||
body, err := io.ReadAll(resp.Body)
|
body, err = io.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue