all: Use own automaxprocs package that doesn't log (ref #9436) (#9437)

### Purpose

🤫
This commit is contained in:
Jakob Borg
2024-02-27 13:05:19 +01:00
committed by GitHub
parent aa559bf496
commit 07a9fa2dbd
20 changed files with 37 additions and 22 deletions
+3 -3
View File
@@ -16,7 +16,7 @@ import (
"path/filepath"
"time"
_ "go.uber.org/automaxprocs"
_ "github.com/syncthing/syncthing/lib/automaxprocs"
)
func main() {
@@ -45,7 +45,7 @@ func generateFiles(dir string, files, maxexp int, srcname string) error {
}
p0 := filepath.Join(dir, string(n[0]), n[0:2])
err = os.MkdirAll(p0, 0755)
err = os.MkdirAll(p0, 0o755)
if err != nil {
log.Fatal(err)
}
@@ -84,7 +84,7 @@ func generateOneFile(fd io.ReadSeeker, p1 string, s int64) error {
return err
}
os.Chmod(p1, os.FileMode(rand.Intn(0777)|0400))
os.Chmod(p1, os.FileMode(rand.Intn(0o777)|0o400))
t := time.Now().Add(-time.Duration(rand.Intn(30*86400)) * time.Second)
return os.Chtimes(p1, t, t)