You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnfmt.Errorf("failed to parse go version: %v", e)
198
196
}
199
197
200
-
ifversion<newestGoVersion-0.01 {
201
-
return&ValidationError{Message: fmt.Sprintf("go version %v is no longer supported. Please upgrade to version %v", version, newestGoVersion)}
202
-
} elseifversion==newestGoVersion-0.01 {
198
+
// Once 1.23 is no longer supported, we will enforce the policy for 1.24 and above
199
+
if (repoVersion<=enforceGoVersionUpgrade) && (enforceGoVersionUpgrade<newestGoVersion-0.01) {
200
+
return&ValidationError{Message: fmt.Sprintf("Your applications go version %v is no longer supported. Please upgrade to version %v.", repoVersion, newestGoVersion)}
201
+
} elseifrepoVersion<=newestGoVersion-0.01 {
203
202
// We'll give a PR comment to the Author to warn them about the need to upgrade
204
-
fmt.Printf("Warning: This go version (%v) is nearing deprecation. Please upgrade to version %v\n", version, newestGoVersion)
203
+
fmt.Printf("Warning: This applications go version will be out of support by the next major release. You will have until the next release before you need to upgrade to version %v\n", newestGoVersion)
205
204
}
206
205
207
206
returnnil
@@ -210,39 +209,39 @@ func validateRun() error {
210
209
// fetchLatestGoVersion fetches the latest Go version from the official Go download page.
211
210
funcfetchLatestGoVersion() (string, error) {
212
211
// official Go download page
213
-
resp, err:=http.Get("https://go.dev/dl/")
214
-
iferr!=nil {
215
-
return"", fmt.Errorf("failed to fetch Go download page: %v", err)
216
-
}
217
-
deferresp.Body.Close()
218
-
219
-
ifresp.StatusCode!=http.StatusOK {
220
-
return"", fmt.Errorf("failed to fetch Go download page: status code %d", resp.StatusCode)
221
-
}
222
-
223
-
bodyBytes, err:=io.ReadAll(resp.Body)
224
-
iferr!=nil {
225
-
return"", fmt.Errorf("failed to read response body: %v", err)
0 commit comments