Skip to content

Commit

Permalink
remove debug code
Browse files Browse the repository at this point in the history
  • Loading branch information
seruva19 committed Mar 2, 2024
1 parent 5e7f15d commit 9d8ab22
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,38 +68,23 @@ func MecchiFolderExists() LoaderResult[string] {
}
}

func containsFile(folderPath string, targetFile string) bool {
filePath := filepath.Join(folderPath, targetFile)
_, err := os.Stat(filePath)
return err == nil
}

func FindMecchiDirectory(rootPath string) (string, error) {
targetFolder := "src"
targetFile := "mecchi.py"

folders, err := os.ReadDir(rootPath)

for _, folder := range folders {
if folder.IsDir() {
fmt.Println(folder.Name())
}
}

if err != nil {
fmt.Printf(err.Error())
return "", err
}

for _, folder := range folders {
if folder.IsDir() {
subfolderPath := filepath.Join(rootPath, folder.Name())
srcFilePath := filepath.Join(subfolderPath, targetFolder, targetFile)
fmt.Println(srcFilePath)

_, err := os.Stat(srcFilePath)
if err == nil {
fmt.Println("found " + subfolderPath)
return subfolderPath, nil
}

Expand Down

0 comments on commit 9d8ab22

Please sign in to comment.