Skip to content

Commit

Permalink
Removed unused function (konveyor#108)
Browse files Browse the repository at this point in the history
Signed-off-by: Maayan Hadasi <[email protected]>
  • Loading branch information
mguetta1 authored Mar 19, 2024
1 parent f2eaffd commit dbca989
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 dbca989

Please sign in to comment.