Skip to content

Commit

Permalink
Removed unused function (#108) (#109)
Browse files Browse the repository at this point in the history
Signed-off-by: Maayan Hadasi <mguetta@redhat.com>
Signed-off-by: Cherry Picker <noreply@github.com>
Co-authored-by: Maayan Hadasi <60384172+mguetta1@users.noreply.github.com>
  • Loading branch information
konveyor-ci-bot[bot] and mguetta1 committed Mar 19, 2024
1 parent 4641550 commit cc2d69a
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions analysis/analysis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import (
"crypto/cipher"
"crypto/sha256"
"encoding/hex"
"io"
"net/http"
"os"
"sort"
"strings"
Expand Down Expand Up @@ -341,26 +339,3 @@ func getDefaultToken() string {
}
return string(decrypted)
}

// DownloadFile downloads the file, params:
// 1) name of file to save as
// 2) URL to download FROM
func DownloadFile(filePath string, url string) error {
// Get the data
resp, err := http.Get(url)
if err != nil {
return err
}
defer resp.Body.Close()

// Create the file
out, err := os.Create(filePath)
if err != nil {
return err
}
defer out.Close()

// Write the body to file
_, err = io.Copy(out, resp.Body)
return err
}

0 comments on commit cc2d69a

Please sign in to comment.