resolve comments

This commit is contained in:
Dmitry Shibanov 2022-02-09 13:02:58 +03:00
parent df1bbd3ffb
commit d0ea3e8472
4 changed files with 8 additions and 8 deletions

View file

@ -62,7 +62,7 @@ steps:
The `check-latest` flag defaults to `false`. Use the default or set `check-latest` to `false` if you prefer stability and if you want to ensure a specific Go version is always used. The `check-latest` flag defaults to `false`. Use the default or set `check-latest` to `false` if you prefer stability and if you want to ensure a specific Go version is always used.
If `check-latest` is set to `true`, the action first checks if the cached version is the latest one. If the locally cached version is not the most up-to-date, a Go version will then be downloaded. Set `check-latest` to `true` it you want the most up-to-date Go version to always be used. If `check-latest` is set to `true`, the action first checks if the cached version is the latest one. If the locally cached version is not the most up-to-date, a Go version will then be downloaded. Set `check-latest` to `true` if you want the most up-to-date Go version to always be used.
> Setting `check-latest` to `true` has performance implications as downloading Go versions is slower than using cached versions. > Setting `check-latest` to `true` has performance implications as downloading Go versions is slower than using cached versions.
@ -76,7 +76,7 @@ steps:
- run: go run hello.go - run: go run hello.go
``` ```
## Matrix Testing: ## Matrix Testing:
```yaml ```yaml
jobs: jobs:
build: build:

View file

@ -589,7 +589,7 @@ describe('setup-go', () => {
expect(logSpy).toHaveBeenCalledWith(`Found in cache @ ${toolPath}`); expect(logSpy).toHaveBeenCalledWith(`Found in cache @ ${toolPath}`);
expect(logSpy).not.toHaveBeenCalledWith( expect(logSpy).not.toHaveBeenCalledWith(
'Attempt to resolve the latest version from manifest...' 'Attempting to resolve the latest version from the manifest...'
); );
}); });
@ -636,7 +636,7 @@ describe('setup-go', () => {
`Setup go stable version spec ${versionSpec}` `Setup go stable version spec ${versionSpec}`
); );
expect(logSpy).toHaveBeenCalledWith( expect(logSpy).toHaveBeenCalledWith(
'Attempt to resolve the latest version from manifest...' 'Attempting to resolve the latest version from the manifest...'
); );
expect(logSpy).toHaveBeenCalledWith(`Resolved as '${patchVersion}'`); expect(logSpy).toHaveBeenCalledWith(`Resolved as '${patchVersion}'`);
expect(logSpy).toHaveBeenCalledWith( expect(logSpy).toHaveBeenCalledWith(
@ -676,7 +676,7 @@ describe('setup-go', () => {
expect(dlSpy).toHaveBeenCalled(); expect(dlSpy).toHaveBeenCalled();
expect(exSpy).toHaveBeenCalled(); expect(exSpy).toHaveBeenCalled();
expect(logSpy).toHaveBeenCalledWith( expect(logSpy).toHaveBeenCalledWith(
'Attempt to resolve the latest version from manifest...' 'Attempting to resolve the latest version from the manifest...'
); );
expect(logSpy).toHaveBeenCalledWith( expect(logSpy).toHaveBeenCalledWith(
`Failed to resolve version ${versionSpec} from manifest` `Failed to resolve version ${versionSpec} from manifest`
@ -721,7 +721,7 @@ describe('setup-go', () => {
expect(dlSpy).toHaveBeenCalled(); expect(dlSpy).toHaveBeenCalled();
expect(exSpy).toHaveBeenCalled(); expect(exSpy).toHaveBeenCalled();
expect(logSpy).toHaveBeenCalledWith( expect(logSpy).toHaveBeenCalledWith(
'Attempt to resolve the latest version from manifest...' 'Attempting to resolve the latest version from the manifest...'
); );
expect(logSpy).toHaveBeenCalledWith( expect(logSpy).toHaveBeenCalledWith(
'Unable to resolve a version from the manifest...' 'Unable to resolve a version from the manifest...'

2
dist/index.js vendored
View file

@ -5895,7 +5895,7 @@ function getGo(versionSpec, stable, checkLatest, auth) {
let osPlat = os_1.default.platform(); let osPlat = os_1.default.platform();
let osArch = os_1.default.arch(); let osArch = os_1.default.arch();
if (checkLatest) { if (checkLatest) {
core.info('Attempt to resolve the latest version from manifest...'); core.info('Attempting to resolve the latest version from the manifest...');
const resolvedVersion = yield resolveVersionFromManifest(versionSpec, stable, auth); const resolvedVersion = yield resolveVersionFromManifest(versionSpec, stable, auth);
if (resolvedVersion) { if (resolvedVersion) {
versionSpec = resolvedVersion; versionSpec = resolvedVersion;

View file

@ -38,7 +38,7 @@ export async function getGo(
let osArch: string = os.arch(); let osArch: string = os.arch();
if (checkLatest) { if (checkLatest) {
core.info('Attempt to resolve the latest version from manifest...'); core.info('Attempting to resolve the latest version from the manifest...');
const resolvedVersion = await resolveVersionFromManifest( const resolvedVersion = await resolveVersionFromManifest(
versionSpec, versionSpec,
stable, stable,