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) {
129129// determined.
130130func getImportPathFromRepoURL (repourl string ) string {
131131 // check for scp-like URL as in "git@github.com:github/codeql-go.git"
132- shorturl := regexp .MustCompile (" ^([^@]+@)?([^:]+):([^/].*?)(\\ .git)?$" )
132+ shorturl := regexp .MustCompile (` ^([^@]+@)?([^:]+):([^/].*?)(\.git)?$` )
133133 m := shorturl .FindStringSubmatch (repourl )
134134 if m != nil {
135135 return m [2 ] + "/" + m [3 ]
@@ -153,7 +153,7 @@ func getImportPathFromRepoURL(repourl string) string {
153153 host := u .Hostname ()
154154 path := u .Path
155155 // strip off leading slashes and trailing `.git` if present
156- path = regexp .MustCompile (" ^/+|\\ .git$" ).ReplaceAllString (path , "" )
156+ path = regexp .MustCompile (` ^/+|\.git$` ).ReplaceAllString (path , "" )
157157 return host + "/" + path
158158}
159159
You can’t perform that action at this time.
0 commit comments