@@ -48,7 +48,7 @@ func TestWithLowOpenFileLimit(t *testing.T) {
4848 )
4949 t .Logf ("writing %d tiny Go files" , numberFilesTotal )
5050 var allGoFiles []string
51- for i := 0 ; i < numberDirs ; i ++ {
51+ for i := range numberDirs {
5252 // Prefix "p", so the package name is a valid identifier.
5353 // Add one go.mod file per directory as well,
5454 // which will help catch data races when loading module info.
@@ -58,14 +58,14 @@ func TestWithLowOpenFileLimit(t *testing.T) {
5858 qt .Assert (t , qt .IsNil (err ))
5959
6060 err = os .WriteFile (filepath .Join (dirPath , "go.mod" ),
61- [] byte ( fmt .Sprintf ( "module %s\n \n go 1.16" , dirName ) ), 0o666 )
61+ fmt .Appendf ( nil , "module %s\n \n go 1.16" , dirName ), 0o666 )
6262 qt .Assert (t , qt .IsNil (err ))
6363
64- for j := 0 ; j < numberFilesPerDir ; j ++ {
64+ for j := range numberFilesPerDir {
6565 filePath := filepath .Join (dirPath , fmt .Sprintf ("%03d.go" , j ))
6666 err := os .WriteFile (filePath ,
6767 // Extra newlines so that "-l" prints all paths.
68- [] byte ( fmt .Sprintf ( "package %s\n \n \n " , dirName ) ), 0o666 )
68+ fmt .Appendf ( nil , "package %s\n \n \n " , dirName ), 0o666 )
6969 qt .Assert (t , qt .IsNil (err ))
7070 allGoFiles = append (allGoFiles , filePath )
7171 }
0 commit comments