Skip to content

Commit ae7adc9

Browse files
committed
Rename return variable
1 parent dce17aa commit ae7adc9

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

go/extractor/cli/go-autobuilder/go-autobuilder.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -270,13 +270,13 @@ func checkDirsNested(inputDirs []string) bool {
270270
return true
271271
}
272272

273-
// Returns the directory to run the go build in and whether a go.mod file was
274-
// found.
275-
func findGoModFiles(emitDiagnostics bool) (baseDir string, goModFound bool) {
273+
// Returns the directory to run the go build in and whether to use a go.mod
274+
// file.
275+
func findGoModFiles(emitDiagnostics bool) (baseDir string, useGoMod bool) {
276276
goModPaths := util.FindAllFilesWithName(".", "go.mod", "vendor")
277277
if len(goModPaths) == 0 {
278278
baseDir = "."
279-
goModFound = false
279+
useGoMod = false
280280
return
281281
}
282282
goModDirs := getDirs(goModPaths)
@@ -285,7 +285,7 @@ func findGoModFiles(emitDiagnostics bool) (baseDir string, goModFound bool) {
285285
diagnostics.EmitGoFilesOutsideGoModules(goModPaths)
286286
}
287287
baseDir = "."
288-
goModFound = false
288+
useGoMod = false
289289
return
290290
}
291291
if len(goModPaths) > 1 {
@@ -298,7 +298,7 @@ func findGoModFiles(emitDiagnostics bool) (baseDir string, goModFound bool) {
298298
}
299299
}
300300
baseDir = "."
301-
goModFound = false
301+
useGoMod = false
302302
return
303303
}
304304
if emitDiagnostics {
@@ -309,7 +309,7 @@ func findGoModFiles(emitDiagnostics bool) (baseDir string, goModFound bool) {
309309
}
310310
}
311311
baseDir = goModDirs[0]
312-
goModFound = true
312+
useGoMod = true
313313
return
314314
}
315315

@@ -332,8 +332,8 @@ func getDepMode(emitDiagnostics bool) (DependencyInstallerMode, string) {
332332
}
333333
}
334334

335-
baseDir, goModFound := findGoModFiles(emitDiagnostics)
336-
if goModFound {
335+
baseDir, useGoMod := findGoModFiles(emitDiagnostics)
336+
if useGoMod {
337337
log.Println("Found go.mod, enabling go modules")
338338
return GoGetWithModules, baseDir
339339
}

0 commit comments

Comments
 (0)