Go: Initialise filesToRemove to an empty array

This commit is contained in:
Michael B. Gale
2024-02-01 11:57:18 +00:00
parent 51eb487022
commit a961e276c1

View File

@@ -110,7 +110,7 @@ func checkDirsNested(inputDirs []string) (string, bool) {
}
// A list of files we created that should be removed after we are done.
var filesToRemove []string
var filesToRemove []string = []string{}
// Try to initialize a go.mod file for projects that do not already have one.
func initGoModForLegacyProject(path string) {
@@ -148,7 +148,7 @@ func RemoveTemporaryExtractorFiles() {
}
}
filesToRemove = nil
filesToRemove = []string{}
}
// Find all go.work files in the working directory and its subdirectories