Skip to content

Commit bc77dbc

Browse files
meorphismeorphis
andauthored
feat: add go installation instructions (#82)
Co-authored-by: meorphis <eric@stainless.com>
1 parent 4a0529f commit bc77dbc

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

src/comment.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -389,18 +389,23 @@ function InstallationDetails(
389389
return null;
390390
}
391391

392-
const { repo } = head.commit.completed.commit;
393-
const githubURL = `https://github.com/${repo.owner}/${repo.name}.git#${repo.branch}`;
392+
const { repo, sha } = head.commit.completed.commit;
393+
const githubHTTPURL = `https://github.com/${repo.owner}/${repo.name}.git#${repo.branch}`;
394+
const githubGoURL = `github.com/${repo.owner}/${repo.name}@${sha}`;
394395

395396
let installation: string | null = null;
396397
switch (lang) {
397398
case "typescript":
398399
case "node": {
399-
installation = `npm install ${githubURL}`;
400+
installation = `npm install ${githubHTTPURL}`;
400401
break;
401402
}
402403
case "python": {
403-
installation = `pip install git+${githubURL}`;
404+
installation = `pip install git+${githubHTTPURL}`;
405+
break;
406+
}
407+
case "go": {
408+
installation = `go get ${githubGoURL}`;
404409
break;
405410
}
406411
default: {

0 commit comments

Comments
 (0)