From 565f584a62d03fe2a66a3175ea40d4ca660fa05a Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Wed, 6 Feb 2019 17:06:59 +0100 Subject: [PATCH] fix(golang): handle github names with version in path --- lib/datasource/go/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/datasource/go/index.js b/lib/datasource/go/index.js index a6f3202b52..3f251f5945 100644 --- a/lib/datasource/go/index.js +++ b/lib/datasource/go/index.js @@ -15,9 +15,11 @@ async function getDatasource(name) { return { datasource: 'github', lookupName: `go-${pkg}/${pkg}` }; } if (name.startsWith('github.com/')) { + const split = name.split('/'); + const lookupName = split[1] + '/' + split[2]; return { datasource: 'github', - lookupName: name.replace('github.com/', ''), + lookupName, }; } const pkgUrl = `https://${name}?go-get=1`; -- GitLab