File tree Expand file tree Collapse file tree 1 file changed +0
-15
lines changed Expand file tree Collapse file tree 1 file changed +0
-15
lines changed Original file line number Diff line number Diff line change @@ -68,38 +68,23 @@ func MecchiFolderExists() LoaderResult[string] {
68
68
}
69
69
}
70
70
71
- func containsFile (folderPath string , targetFile string ) bool {
72
- filePath := filepath .Join (folderPath , targetFile )
73
- _ , err := os .Stat (filePath )
74
- return err == nil
75
- }
76
-
77
71
func FindMecchiDirectory (rootPath string ) (string , error ) {
78
72
targetFolder := "src"
79
73
targetFile := "mecchi.py"
80
74
81
75
folders , err := os .ReadDir (rootPath )
82
76
83
- for _ , folder := range folders {
84
- if folder .IsDir () {
85
- fmt .Println (folder .Name ())
86
- }
87
- }
88
-
89
77
if err != nil {
90
- fmt .Printf (err .Error ())
91
78
return "" , err
92
79
}
93
80
94
81
for _ , folder := range folders {
95
82
if folder .IsDir () {
96
83
subfolderPath := filepath .Join (rootPath , folder .Name ())
97
84
srcFilePath := filepath .Join (subfolderPath , targetFolder , targetFile )
98
- fmt .Println (srcFilePath )
99
85
100
86
_ , err := os .Stat (srcFilePath )
101
87
if err == nil {
102
- fmt .Println ("found " + subfolderPath )
103
88
return subfolderPath , nil
104
89
}
105
90
You can’t perform that action at this time.
0 commit comments