From 5be028858c0bca8f7f9c7478c7ea6b1a26d9f74d Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 7 Nov 2024 05:08:17 -0600 Subject: [PATCH] start moving mappings to a config file --- new.go | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/new.go b/new.go index 7776aec..a819a4a 100644 --- a/new.go +++ b/new.go @@ -127,6 +127,12 @@ func Clone(wdir string, path string) error { if err != nil { 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 { case "golang.org/x/crypto": path = "go.googlesource.com/crypto" @@ -154,23 +160,6 @@ func Clone(wdir string, path string) error { return nil } 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 if url, err = runGoList(path); err != nil {