diff options
author | Andrew Newdigate <andrew@gitlab.com> | 2017-07-24 19:54:10 +0300 |
---|---|---|
committer | Andrew Newdigate <andrew@gitlab.com> | 2017-07-24 19:54:10 +0300 |
commit | 94fda75b9aa52c28e0e5d4e7c0ce804b647316c2 (patch) | |
tree | de8349d5ca549d2a1f47db22f2d710a7ee4aa063 /_support | |
parent | be61c4ae53db0be313287a46d6bac0a932024ab9 (diff) |
Drop `go-get-if-missing`
Diffstat (limited to '_support')
-rw-r--r-- | _support/go-get-if-missing.go | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/_support/go-get-if-missing.go b/_support/go-get-if-missing.go deleted file mode 100644 index 91fe154bb..000000000 --- a/_support/go-get-if-missing.go +++ /dev/null @@ -1,29 +0,0 @@ -package main - -import ( - "fmt" - "os" - "os/exec" -) - -func main() { - if len(os.Args) != 3 { - fmt.Println("Usage: go run go-get-if-missing.go EXECUTABLE GO_PACKAGE") - os.Exit(1) - } - if err := goGetIfMissing(os.Args[1], os.Args[2]); err != nil { - fmt.Printf("error: %v\n", err) - os.Exit(1) - } -} - -func goGetIfMissing(executable string, goPackage string) error { - if _, err := exec.LookPath(executable); err == nil { - return nil - } - - cmd := exec.Command("go", "get", goPackage) - cmd.Stderr = os.Stderr - fmt.Println(cmd.Args) - return cmd.Run() -} |