UPDATE: update to go 1.25

This commit is contained in:
2025-08-24 17:22:30 +07:00
parent b2adcd7981
commit 99b9df1ce5
11 changed files with 1232 additions and 1730 deletions

View File

@@ -109,8 +109,6 @@ func DownloadFile(filepath string, url string, onEmit func(percent float64, spee
return nil
}
func unzipParallel(src string, dest string) error {
numCPU := runtime.NumCPU()
@@ -141,16 +139,14 @@ func unzipParallel(src string, dest string) error {
// Worker pool
for i := 0; i < maxWorkers; i++ {
wg.Add(1)
go func() {
defer wg.Done()
wg.Go(func() {
for j := range jobs {
err := extractFile(j.f, dest)
if err != nil {
fmt.Printf("Error extracting %s: %v\n", j.f.Name, err)
}
}
}()
})
}
// Feed jobs
@@ -189,4 +185,4 @@ func extractFile(f *zip.File, dest string) error {
_, err = io.Copy(out, rc)
return err
}
}