diff --git a/usage/update/github.go b/usage/update/github.go index 6b3cac1b..89d4a183 100644 --- a/usage/update/github.go +++ b/usage/update/github.go @@ -51,22 +51,22 @@ func getLatestGitHubRelease(app, version, repository string) *githubRelease { engine.SetDialTimeout(3) engine.SetRequestTimeout(3) - response, err := engine.Get(req.Request{ + resp, err := engine.Get(req.Request{ URL: githubAPI + "/repos/" + repository + "/releases/latest", Headers: req.Headers{"X-GitHub-Api-Version": "2022-11-28"}, AutoDiscard: true, }) - if err != nil || response.StatusCode != 200 { + if err != nil || resp.StatusCode != 200 { return nil } - if response.Header.Get("X-RateLimit-Remaining") == "0" { + if resp.Header.Get("X-RateLimit-Remaining") == "0" { return nil } release := &githubRelease{} - err = response.JSON(release) + err = resp.JSON(release) if err != nil { return nil diff --git a/usage/update/gitlab.go b/usage/update/gitlab.go index c6475b99..c83784d7 100644 --- a/usage/update/gitlab.go +++ b/usage/update/gitlab.go @@ -55,21 +55,21 @@ func getLatestGitLabRelease(app, version, repository string) *gitlabRelease { repository = strings.ReplaceAll(repository, "/", "%2F") } - response, err := engine.Get(req.Request{ + resp, err := engine.Get(req.Request{ URL: gitlabAPI + "/projects/" + repository + "/releases/permalink/latest", AutoDiscard: true, }) - if err != nil || response.StatusCode != 200 { + if err != nil || resp.StatusCode != 200 { return nil } - if response.Header.Get("RateLimit-Remaining") == "0" { + if resp.Header.Get("RateLimit-Remaining") == "0" { return nil } release := &gitlabRelease{} - err = response.JSON(release) + err = resp.JSON(release) if err != nil { return nil