Rename the go module to github.com/github/codeql-go

This commit is contained in:
Sauyon Lee
2020-02-07 01:27:33 -08:00
parent c94f5dafb3
commit 5417102c37
7 changed files with 14 additions and 14 deletions

View File

@@ -94,7 +94,7 @@ func getImportPath() (importpath string) {
}
func getImportPathFromRepoURL(repourl string) string {
// check for scp-like URL as in "git@github.com:Semmle/go.git"
// check for scp-like URL as in "git@github.com:github/codeql-go.git"
shorturl := regexp.MustCompile("^([^@]+@)?([^:]+):([^/].*?)(\\.git)?$")
m := shorturl.FindStringSubmatch(repourl)
if m != nil {

View File

@@ -4,11 +4,11 @@ import "testing"
func TestGetImportPathFromRepoURL(t *testing.T) {
tests := map[string]string{
"git@github.com:Semmle/go.git": "github.com/Semmle/go",
"git@github.com:Semmle/go": "github.com/Semmle/go",
"https://github.com/Semmle/go.git": "github.com/Semmle/go",
"https://github.com:12345/Semmle/go": "github.com/Semmle/go",
"gitolite@some.url:some/repo": "some.url/some/repo",
"git@github.com:github/codeql-go.git": "github.com/github/codeql-go",
"git@github.com:github/codeql-go": "github.com/github/codeql-go",
"https://github.com/github/codeql-go.git": "github.com/github/codeql-go",
"https://github.com:12345/github/codeql-go": "github.com/github/codeql-go",
"gitolite@some.url:some/repo": "some.url/some/repo",
}
for input, expected := range tests {
actual := getImportPathFromRepoURL(input)

View File

@@ -6,9 +6,9 @@ import (
"os"
"strings"
"github.com/Semmle/go/extractor/dbscheme"
"github.com/github/codeql-go/extractor/dbscheme"
"github.com/Semmle/go/extractor"
"github.com/github/codeql-go/extractor"
)
func usage() {

View File

@@ -7,7 +7,7 @@ import (
"reflect"
"strings"
"github.com/Semmle/go/extractor/trap"
"github.com/github/codeql-go/extractor/trap"
)
// A Type represents a database type

View File

@@ -17,9 +17,9 @@ import (
"sync"
"time"
"github.com/Semmle/go/extractor/dbscheme"
"github.com/Semmle/go/extractor/srcarchive"
"github.com/Semmle/go/extractor/trap"
"github.com/github/codeql-go/extractor/dbscheme"
"github.com/github/codeql-go/extractor/srcarchive"
"github.com/github/codeql-go/extractor/trap"
"golang.org/x/tools/go/packages"
)

View File

@@ -9,7 +9,7 @@ import (
"path/filepath"
"unicode/utf8"
"github.com/Semmle/go/extractor/srcarchive"
"github.com/github/codeql-go/extractor/srcarchive"
"golang.org/x/tools/go/packages"
)

2
go.mod
View File

@@ -1,4 +1,4 @@
module github.com/Semmle/go
module github.com/github/codeql-go
go 1.13