Skip to content

Commit 01694ee

Browse files
committed
Fixed linter problems
1 parent 3bf44d2 commit 01694ee

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

arduino/resources/download.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,15 @@ func (r *DownloadResource) Download(downloadDir *paths.Path, config *downloader.
5959
return DownloadFile(path, r.URL, label, downloadCB, config)
6060
}
6161

62+
// DownloadFile downloads a file from a URL into the specified path. An optional config and options may be passed (or nil to use the defaults).
63+
// A DownloadProgressCB callback function must be passed to monitor download progress.
6264
func DownloadFile(path *paths.Path, URL string, label string, downloadCB DownloadProgressCB, config *downloader.Config, options ...downloader.DownloadOptions) error {
6365
if config == nil {
64-
if c, err := GetDownloaderConfig(); err != nil {
66+
c, err := GetDownloaderConfig()
67+
if err != nil {
6568
return err
66-
} else {
67-
config = c
6869
}
70+
config = c
6971
}
7072

7173
d, err := downloader.DownloadWithConfig(path.String(), URL, *config, options...)

0 commit comments

Comments
 (0)