Skip to content

Commit c803f9b

Browse files
committed
fix: the function name is too long,and privatize the function.
Signed-off-by: 0zyt <zyt0@duck.com>
1 parent a880a66 commit c803f9b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

pkg/util/downloader/downloader.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func Download(url, filename, targetDir string) (int64, error) {
4242
log.Debugf("download create file failed: %s", err)
4343
}
4444
}()
45-
return FetchContentFromURLAndSetUpProgressBar(url, f)
45+
return downloadProgress(url, f)
4646
}
4747

4848
func FetchContentFromURL(url string) ([]byte, error) {
@@ -86,7 +86,8 @@ func SetUpProgressBar(resp *http.Response, downFile io.Writer) (int64, error) {
8686
return io.Copy(writer, source)
8787
}
8888

89-
func FetchContentFromURLAndSetUpProgressBar(url string, dst io.Writer) (int64, error) {
89+
// download from the URL to the dst and watch the progress
90+
func downloadProgress(url string, dst io.Writer) (int64, error) {
9091
resp, err := http.Get(url)
9192

9293
// check response error

0 commit comments

Comments
 (0)