Skip to content
Snippets Groups Projects
Commit 565f584a authored by Rhys Arkins's avatar Rhys Arkins
Browse files

fix(golang): handle github names with version in path

parent b1cc20d8
No related branches found
No related tags found
No related merge requests found
...@@ -15,9 +15,11 @@ async function getDatasource(name) { ...@@ -15,9 +15,11 @@ async function getDatasource(name) {
return { datasource: 'github', lookupName: `go-${pkg}/${pkg}` }; return { datasource: 'github', lookupName: `go-${pkg}/${pkg}` };
} }
if (name.startsWith('github.com/')) { if (name.startsWith('github.com/')) {
const split = name.split('/');
const lookupName = split[1] + '/' + split[2];
return { return {
datasource: 'github', datasource: 'github',
lookupName: name.replace('github.com/', ''), lookupName,
}; };
} }
const pkgUrl = `https://${name}?go-get=1`; const pkgUrl = `https://${name}?go-get=1`;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment