Add fmt target to makefile and run it

This commit is contained in:
r4
2022-09-20 17:43:47 +02:00
parent a5757c3079
commit 7bdfcf9776
6 changed files with 50 additions and 47 deletions

View File

@@ -19,9 +19,9 @@ import (
)
var (
ErrUnsupportedOSAndArch = errors.New("no download available for your operating system and hardware architecture")
ErrUnsupportedOSAndArch = errors.New("no download available for your operating system and hardware architecture")
ErrFileNotFoundInArchive = errors.New("file not found in archive")
ErrUnsupportedArchive = errors.New("unsupported archive format (supported are .tar, .tar.gz, .tar.xz and .zip")
ErrUnsupportedArchive = errors.New("unsupported archive format (supported are .tar, .tar.gz, .tar.xz and .zip")
)
func download(executable bool, urlsByOS map[string]map[string]string, progCallback func(progress float32)) (filename string, err error) {
@@ -85,7 +85,7 @@ func download(executable bool, urlsByOS map[string]map[string]string, progCallba
}
}
if progCallback != nil && size != 0 {
progCallback(float32(i)/float32(size))
progCallback(float32(i) / float32(size))
}
}
return savePath, nil