@@ -128,7 +128,7 @@ func checkDirsNested(inputDirs []string) (string, bool) {
128
128
var filesToRemove []string = []string {}
129
129
130
130
// 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 ) {
132
132
log .Printf ("Project appears to be a legacy Go project, attempting to initialize go.mod in %s\n " , path )
133
133
134
134
modInit := toolchain .InitModule (path )
@@ -395,7 +395,7 @@ func getBuildRoots(emitDiagnostics bool) (goWorkspaces []GoWorkspace, totalModul
395
395
}
396
396
397
397
// Try to initialize a `go.mod` file automatically.
398
- initGoModForLegacyProject ("." )
398
+ InitGoModForLegacyProject ("." )
399
399
400
400
goWorkspaces = []GoWorkspace {{
401
401
BaseDir : "." ,
@@ -437,7 +437,7 @@ func getBuildRoots(emitDiagnostics bool) (goWorkspaces []GoWorkspace, totalModul
437
437
438
438
// Try to initialize a `go.mod` file automatically for the stray source files.
439
439
if ! slices .Contains (goModDirs , path ) {
440
- initGoModForLegacyProject (path )
440
+ InitGoModForLegacyProject (path )
441
441
goWorkspaces = append (goWorkspaces , GoWorkspace {
442
442
BaseDir : path ,
443
443
Modules : loadGoModules ([]string {filepath .Join (path , "go.mod" )}),
0 commit comments