File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ import {StableReleaseAlias} from './utils';
1010
1111type InstallationType = 'dist' | 'manifest' ;
1212
13+ const golangDownloadUrl = 'https://go.dev/dl/?mode=json&include=all' ;
14+
1315export 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 {
434435async 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` ) ;
You can’t perform that action at this time.
0 commit comments