updated http client name

This commit is contained in:
Alif Rachmawadi 2019-08-16 15:51:49 +07:00
parent 4ed5ef83f3
commit ab2744dd0f
No known key found for this signature in database
GPG key ID: 79DA63C0F3A55BB1
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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();