mirror of
https://github.com/actions/setup-go.git
synced 2025-04-23 17:40:50 +00:00
updated http client name
This commit is contained in:
parent
4ed5ef83f3
commit
ab2744dd0f
2 changed files with 2 additions and 2 deletions
|
@ -166,7 +166,7 @@ function unique(value, index, self) {
|
||||||
}
|
}
|
||||||
function getAvailableVersions() {
|
function getAvailableVersions() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
let http = new httpm.HttpClient('setup-java');
|
let http = new httpm.HttpClient('setup-go');
|
||||||
let contents = yield (yield http.get('https://api.github.com/repos/golang/go/git/refs/tags')).readBody();
|
let contents = yield (yield http.get('https://api.github.com/repos/golang/go/git/refs/tags')).readBody();
|
||||||
const matches = contents.match(/go\d+\.[\w\.]+/g) || [];
|
const matches = contents.match(/go\d+\.[\w\.]+/g) || [];
|
||||||
const versions = matches
|
const versions = matches
|
||||||
|
|
|
@ -167,7 +167,7 @@ function unique(value: string, index: number, self: string[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getAvailableVersions(): Promise<string[]> {
|
async function getAvailableVersions(): Promise<string[]> {
|
||||||
let http: httpm.HttpClient = new httpm.HttpClient('setup-java');
|
let http: httpm.HttpClient = new httpm.HttpClient('setup-go');
|
||||||
let contents = await (await http.get(
|
let contents = await (await http.get(
|
||||||
'https://api.github.com/repos/golang/go/git/refs/tags'
|
'https://api.github.com/repos/golang/go/git/refs/tags'
|
||||||
)).readBody();
|
)).readBody();
|
||||||
|
|
Loading…
Add table
Reference in a new issue