Skip to content

Commit d7cb9bd

Browse files
committed
Fix golang download url to go.dev
1 parent be1aa11 commit d7cb9bd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/installer.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import {StableReleaseAlias} from './utils';
1010

1111
type InstallationType = 'dist' | 'manifest';
1212

13+
const golangDownloadUrl = 'https://go.dev/dl/?mode=json&include=all';
14+
1315
export interface IGoVersionFile {
1416
filename: string;
1517
// darwin, linux, windows
@@ -335,9 +337,8 @@ export async function findMatch(
335337
let result: IGoVersion | undefined;
336338
let match: IGoVersion | undefined;
337339

338-
const dlUrl = 'https://golang.org/dl/?mode=json&include=all';
339340
const candidates: IGoVersion[] | null = await module.exports.getVersionsDist(
340-
dlUrl
341+
golangDownloadUrl
341342
);
342343
if (!candidates) {
343344
throw new Error(`golang download url did not return results`);
@@ -434,9 +435,8 @@ export function parseGoVersionFile(versionFilePath: string): string {
434435
async function resolveStableVersionDist(versionSpec: string, arch: string) {
435436
const archFilter = sys.getArch(arch);
436437
const platFilter = sys.getPlatform();
437-
const dlUrl = 'https://golang.org/dl/?mode=json&include=all';
438438
const candidates: IGoVersion[] | null = await module.exports.getVersionsDist(
439-
dlUrl
439+
golangDownloadUrl
440440
);
441441
if (!candidates) {
442442
throw new Error(`golang download url did not return results`);

0 commit comments

Comments
 (0)