Prepare code base for Go 1.24 update. (#29412)

* Fix "t.Fatal from a non-test goroutine" errors in cache_test.go

 - t.Fatal(f) should not be called within a Go routine based on it's documentation and only from the main test's thread.
 - In 1.24 this seems to cause build failures

* Address all "non-constant format string errors" from go vet

 - Within 1.24 these now cause test builds to fail

…" from go vet
This commit is contained in:
Steven Clark
2025-01-27 14:34:07 -05:00
committed by GitHub
parent 5ff8a3d6f1
commit 9456671f04
23 changed files with 69 additions and 64 deletions

View File

@@ -742,7 +742,7 @@ func TestDebugCommand_InsecureUmask(t *testing.T) {
// check permissions of the parent debug directory
err = isValidFilePermissions(fs)
if err != nil {
t.Fatalf(err.Error())
t.Fatal(err.Error())
}
// check permissions of the files within the parent directory
@@ -768,7 +768,7 @@ func TestDebugCommand_InsecureUmask(t *testing.T) {
err = filepath.Walk(bundlePath, func(path string, info os.FileInfo, err error) error {
err = isValidFilePermissions(info)
if err != nil {
t.Fatalf(err.Error())
t.Fatal(err.Error())
}
return nil
})