From dbca989c502d34adbf71fe004814536b9b01c2e6 Mon Sep 17 00:00:00 2001 From: Maayan Hadasi <60384172+mguetta1@users.noreply.github.com> Date: Tue, 19 Mar 2024 10:56:08 +0200 Subject: [PATCH] Removed unused function (#108) Signed-off-by: Maayan Hadasi --- analysis/analysis_test.go | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/analysis/analysis_test.go b/analysis/analysis_test.go index 63c41074..b6d00f6e 100644 --- a/analysis/analysis_test.go +++ b/analysis/analysis_test.go @@ -5,8 +5,6 @@ import ( "crypto/cipher" "crypto/sha256" "encoding/hex" - "io" - "net/http" "os" "sort" "strings" @@ -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 -}