start moving mappings to a config file
This commit is contained in:
parent
6b1330d7f3
commit
5be028858c
23
new.go
23
new.go
|
@ -127,6 +127,12 @@ func Clone(wdir string, path string) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
// TODO: attempt to work around things like:
|
||||||
|
// todo: move this to a resources/ text file in go-clone
|
||||||
|
// go get golang.org/x/term
|
||||||
|
// is now supposed to be:
|
||||||
|
// git clone https://go.googlesource.com/term
|
||||||
|
// if url, err = findGoImport("http://" + path); err != nil {
|
||||||
switch path {
|
switch path {
|
||||||
case "golang.org/x/crypto":
|
case "golang.org/x/crypto":
|
||||||
path = "go.googlesource.com/crypto"
|
path = "go.googlesource.com/crypto"
|
||||||
|
@ -154,23 +160,6 @@ func Clone(wdir string, path string) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
var url string
|
var url string
|
||||||
// TODO: attempt to work around things like:
|
|
||||||
// go get golang.org/x/term
|
|
||||||
// is now supposed to be:
|
|
||||||
// git clone https://go.googlesource.com/term
|
|
||||||
// if url, err = findGoImport("http://" + path); err != nil {
|
|
||||||
if path == "golang.org/x/term" {
|
|
||||||
log.Warn("IMPLEMENT git clone hack here. path =", path)
|
|
||||||
log.Warn("IMPLEMENT git clone hack here. path =", path)
|
|
||||||
path = "go.googlesource.com/term"
|
|
||||||
log.Warn("IMPLEMENT git clone hack here. new path =", path)
|
|
||||||
log.Warn("IMPLEMENT git clone hack here. new path =", path)
|
|
||||||
shell.RunPath(fulldir, []string{"git", "clone", "http://" + path})
|
|
||||||
if IsDirectory(fullpath) {
|
|
||||||
// clone worked
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// this creates a valid URL for git clone
|
// this creates a valid URL for git clone
|
||||||
if url, err = runGoList(path); err != nil {
|
if url, err = runGoList(path); err != nil {
|
||||||
|
|
Loading…
Reference in New Issue