refactor(upgrade): rename insecureGet which is no longer insecure (#9735)

This commit is contained in:
Jakob Borg 2024-09-25 17:50:22 +02:00 committed by GitHub
parent 23fc22ebc5
commit 3583949706
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -78,7 +78,7 @@ func init() {
osVersion = strings.TrimSpace(osVersion)
}
func insecureGet(url, version string) (*http.Response, error) {
func upgradeClientGet(url, version string) (*http.Response, error) {
req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
return nil, err
@ -94,7 +94,7 @@ func insecureGet(url, version string) (*http.Response, error) {
// FetchLatestReleases returns the latest releases. The "current" parameter
// is used for setting the User-Agent only.
func FetchLatestReleases(releasesURL, current string) []Release {
resp, err := insecureGet(releasesURL, current)
resp, err := upgradeClientGet(releasesURL, current)
if err != nil {
l.Infoln("Couldn't fetch release information:", err)
return nil