MCPcopy Create free account
hub / github.com/devspace-sh/devspace / downloadTo

Method downloadTo

pkg/devspace/plugin/installer.go:68–82  ·  view source on GitHub ↗
(binaryPath, outFile string)

Source from the content-addressed store, hash-verified

66}
67
68func (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
84func (i *installer) DownloadMetadata(path, version string) (*Metadata, error) {
85 if isLocalReference(path) {

Callers 1

DownloadBinaryMethod · 0.95

Calls 3

CloseMethod · 0.65
CopyMethod · 0.65
GetMethod · 0.45

Tested by

no test coverage detected