(binaryPath, outFile string)
| 66 | } |
| 67 | |
| 68 | func (i *installer) downloadTo(binaryPath, outFile string) error { |
| 69 | resp, err := http.Get(binaryPath) |
| 70 | if err != nil { |
| 71 | return err |
| 72 | } |
| 73 | |
| 74 | defer resp.Body.Close() |
| 75 | out, err := os.Create(outFile) |
| 76 | if err != nil { |
| 77 | return err |
| 78 | } |
| 79 | defer out.Close() |
| 80 | _, err = io.Copy(out, resp.Body) |
| 81 | return err |
| 82 | } |
| 83 | |
| 84 | func (i *installer) DownloadMetadata(path, version string) (*Metadata, error) { |
| 85 | if isLocalReference(path) { |
no test coverage detected