mirror of
https://github.com/actions/setup-go.git
synced 2025-12-18 21:47:07 +00:00
Merge daa46e9a61 into 3a0c2c8245
This commit is contained in:
commit
35cd40c5ff
3 changed files with 8 additions and 9 deletions
|
|
@ -18,6 +18,8 @@ const MANIFEST_URL = `https://raw.githubusercontent.com/${MANIFEST_REPO_OWNER}/$
|
|||
|
||||
type InstallationType = 'dist' | 'manifest';
|
||||
|
||||
const GOLANG_DOWNLOAD_URL = 'https://go.dev/dl/?mode=json&include=all';
|
||||
|
||||
export interface IGoVersionFile {
|
||||
filename: string;
|
||||
// darwin, linux, windows
|
||||
|
|
@ -409,9 +411,8 @@ export async function findMatch(
|
|||
let result: IGoVersion | undefined;
|
||||
let match: IGoVersion | undefined;
|
||||
|
||||
const dlUrl = 'https://golang.org/dl/?mode=json&include=all';
|
||||
const candidates: IGoVersion[] | null = await module.exports.getVersionsDist(
|
||||
dlUrl
|
||||
GOLANG_DOWNLOAD_URL
|
||||
);
|
||||
if (!candidates) {
|
||||
throw new Error(`golang download url did not return results`);
|
||||
|
|
@ -527,9 +528,8 @@ async function resolveStableVersionDist(
|
|||
) {
|
||||
const archFilter = sys.getArch(arch);
|
||||
const platFilter = sys.getPlatform();
|
||||
const dlUrl = 'https://golang.org/dl/?mode=json&include=all';
|
||||
const candidates: IGoVersion[] | null = await module.exports.getVersionsDist(
|
||||
dlUrl
|
||||
GOLANG_DOWNLOAD_URL
|
||||
);
|
||||
if (!candidates) {
|
||||
throw new Error(`golang download url did not return results`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue