File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ func getImportPath() (importpath string) {
129
129
// determined.
130
130
func getImportPathFromRepoURL (repourl string ) string {
131
131
// check for scp-like URL as in "[email protected] :github/codeql-go.git"
132
- shorturl := regexp .MustCompile (" ^([^@]+@)?([^:]+):([^/].*?)(\\ .git)?$" )
132
+ shorturl := regexp .MustCompile (` ^([^@]+@)?([^:]+):([^/].*?)(\.git)?$` )
133
133
m := shorturl .FindStringSubmatch (repourl )
134
134
if m != nil {
135
135
return m [2 ] + "/" + m [3 ]
@@ -153,7 +153,7 @@ func getImportPathFromRepoURL(repourl string) string {
153
153
host := u .Hostname ()
154
154
path := u .Path
155
155
// strip off leading slashes and trailing `.git` if present
156
- path = regexp .MustCompile (" ^/+|\\ .git$" ).ReplaceAllString (path , "" )
156
+ path = regexp .MustCompile (` ^/+|\.git$` ).ReplaceAllString (path , "" )
157
157
return host + "/" + path
158
158
}
159
159
You can’t perform that action at this time.
0 commit comments