Skip to content

Commit 3721273

Browse files
committed
Go: Delete unused AnyGoFilesOutsideDirs
1 parent ac484e5 commit 3721273

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

go/extractor/util/util.go

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -320,26 +320,6 @@ func FindAllFilesWithName(root string, name string, dirsToSkip ...string) []stri
320320
return paths
321321
}
322322

323-
// Determines whether there are any Go source files in locations which do not have a Go.mod
324-
// file in the same directory or higher up in the file hierarchy, relative to the `root`.
325-
func AnyGoFilesOutsideDirs(root string, dirsToSkip ...string) bool {
326-
found := false
327-
filepath.WalkDir(root, func(path string, d fs.DirEntry, err error) error {
328-
if err != nil {
329-
return err
330-
}
331-
if d.IsDir() && slices.Contains(dirsToSkip, path) {
332-
return filepath.SkipDir
333-
}
334-
if filepath.Ext(d.Name()) == ".go" {
335-
found = true
336-
return filepath.SkipAll
337-
}
338-
return nil
339-
})
340-
return found
341-
}
342-
343323
// Returns an array of any Go source files in locations which do not have a Go.mod
344324
// file in the same directory or higher up in the file hierarchy, relative to the `root`.
345325
func GoFilesOutsideDirs(root string, dirsToSkip ...string) []string {

0 commit comments

Comments
 (0)