Skip to content

Commit 107f2fc

Browse files
committed
run prettier
1 parent 78af96c commit 107f2fc

5 files changed

Lines changed: 9 additions & 23 deletions

File tree

.github/workflows/microsoft-validation.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ on:
1010
paths-ignore:
1111
- '**.md'
1212

13-
env:
14-
MICROSOFT_GO_BASE_URL: 'https://aka.ms/golang/release/latest'
15-
1613
jobs:
1714
microsoft-basic:
1815
name: 'Microsoft build of Go ${{ matrix.go-version }} on ${{ matrix.os }}'
@@ -29,7 +26,7 @@ jobs:
2926
uses: ./
3027
with:
3128
go-version: ${{ matrix.go-version }}
32-
go-download-base-url: ${{ env.MICROSOFT_GO_BASE_URL }}
29+
go-download-base-url: 'https://aka.ms/golang/release/latest'
3330
cache: false
3431

3532
- name: Verify Go installation
@@ -104,7 +101,7 @@ jobs:
104101
uses: ./
105102
with:
106103
go-version: '1.25'
107-
go-download-base-url: ${{ env.MICROSOFT_GO_BASE_URL }}
104+
go-download-base-url: 'https://aka.ms/golang/release/latest'
108105
architecture: ${{ matrix.architecture }}
109106
cache: false
110107

@@ -125,7 +122,7 @@ jobs:
125122
uses: ./
126123
with:
127124
go-version: '1.25'
128-
go-download-base-url: ${{ env.MICROSOFT_GO_BASE_URL }}
125+
go-download-base-url: 'https://aka.ms/golang/release/latest'
129126
cache: true
130127

131128
- name: Verify Go installation

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ See [action.yml](action.yml).
5555
# Architecture to install (auto-detected if not specified)
5656
architecture: 'x64'
5757

58-
# Custom base URL for Go downloads (e.g., for mirrors or Microsoft Go)
58+
# Custom base URL for Go downloads (e.g., for mirrors)
5959
go-download-base-url: ''
6060
```
6161
<!-- end usage -->

__tests__/setup-go.test.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,9 @@ describe('setup-go', () => {
129129
});
130130

131131
afterEach(() => {
132-
// clear out env var set during 'run'
132+
// clear out env vars set during 'run'
133133
delete process.env[im.GOTOOLCHAIN_ENV_VAR];
134+
delete process.env['GO_DOWNLOAD_BASE_URL'];
134135

135136
//jest.resetAllMocks();
136137
jest.clearAllMocks();
@@ -1272,8 +1273,6 @@ use .
12721273
`Using custom Go download base URL: ${customBaseUrl}`
12731274
);
12741275
expect(logSpy).toHaveBeenCalledWith('Install from custom download URL');
1275-
1276-
delete process.env['GO_DOWNLOAD_BASE_URL'];
12771276
});
12781277

12791278
it('input takes precedence over environment variable', async () => {
@@ -1302,8 +1301,6 @@ use .
13021301
expect(logSpy).toHaveBeenCalledWith(
13031302
`Acquiring go1.13.1 from ${inputUrl}/go1.13.1.linux-amd64.tar.gz`
13041303
);
1305-
1306-
delete process.env['GO_DOWNLOAD_BASE_URL'];
13071304
});
13081305

13091306
it('errors when stable alias is used with custom URL', async () => {

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ inputs:
2020
architecture:
2121
description: 'Target architecture for Go to use. Examples: x86, x64. Will use system architecture by default.'
2222
go-download-base-url:
23-
description: 'Custom base URL for downloading Go distributions. Use this to download Go from a mirror or custom source (e.g., for Microsoft Go). Defaults to "https://go.dev/dl". Can also be set via the GO_DOWNLOAD_BASE_URL environment variable. The input takes precedence over the environment variable.'
23+
description: 'Custom base URL for downloading Go distributions. Use this to download Go from a mirror or custom source. Defaults to "https://go.dev/dl". Can also be set via the GO_DOWNLOAD_BASE_URL environment variable. The input takes precedence over the environment variable.'
2424
outputs:
2525
go-version:
2626
description: 'The installed Go version. Useful when given a version range as input.'

src/installer.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,7 @@ export async function getGo(
157157
// Try download from internal distribution (popular versions only)
158158
//
159159
try {
160-
info = await getInfoFromManifest(
161-
versionSpec,
162-
true,
163-
auth,
164-
arch,
165-
manifest
166-
);
160+
info = await getInfoFromManifest(versionSpec, true, auth, arch, manifest);
167161
if (info) {
168162
downloadPath = await installGoVersion(info, auth, arch);
169163
} else {
@@ -485,9 +479,7 @@ export function getInfoFromDirectDownload(
485479
const fileName = `${goVersion}.${platStr}-${archStr}.${extension}`;
486480
const downloadUrl = `${goDownloadBaseUrl}/${fileName}`;
487481

488-
core.info(
489-
`Constructed direct download URL: ${downloadUrl}`
490-
);
482+
core.info(`Constructed direct download URL: ${downloadUrl}`);
491483

492484
return <IGoVersionInfo>{
493485
type: 'dist',

0 commit comments

Comments
 (0)