@@ -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