@@ -128,7 +128,7 @@ func checkDirsNested(inputDirs []string) (string, bool) {
128128var filesToRemove []string = []string {}
129129
130130// Try to initialize a go.mod file for projects that do not already have one.
131- func initGoModForLegacyProject (path string ) {
131+ func InitGoModForLegacyProject (path string ) {
132132 log .Printf ("Project appears to be a legacy Go project, attempting to initialize go.mod in %s\n " , path )
133133
134134 modInit := toolchain .InitModule (path )
@@ -395,7 +395,7 @@ func getBuildRoots(emitDiagnostics bool) (goWorkspaces []GoWorkspace, totalModul
395395 }
396396
397397 // Try to initialize a `go.mod` file automatically.
398- initGoModForLegacyProject ("." )
398+ InitGoModForLegacyProject ("." )
399399
400400 goWorkspaces = []GoWorkspace {{
401401 BaseDir : "." ,
@@ -437,7 +437,7 @@ func getBuildRoots(emitDiagnostics bool) (goWorkspaces []GoWorkspace, totalModul
437437
438438 // Try to initialize a `go.mod` file automatically for the stray source files.
439439 if ! slices .Contains (goModDirs , path ) {
440- initGoModForLegacyProject (path )
440+ InitGoModForLegacyProject (path )
441441 goWorkspaces = append (goWorkspaces , GoWorkspace {
442442 BaseDir : path ,
443443 Modules : loadGoModules ([]string {filepath .Join (path , "go.mod" )}),
0 commit comments