mirror of
https://github.com/LukeHagar/slinky.git
synced 2025-12-06 04:21:20 +00:00
Add debug logging for filesystem traversal in URL collection functions
Introduce debug output in CollectURLsWithIgnoreConfig, CollectURLsProgressWithIgnoreConfig, and CollectURLsV2 functions to log the paths being walked during filesystem traversal. This change aids in debugging and provides better visibility into the URL collection process.
This commit is contained in:
@@ -196,6 +196,9 @@ func CollectURLsWithIgnoreConfig(rootPath string, globs []string, respectGitigno
|
||||
|
||||
// Walk the filesystem
|
||||
walkFn := func(path string, d os.DirEntry, err error) error {
|
||||
if isDebugEnv() {
|
||||
fmt.Printf("::debug:: Walking path: %s\n", path)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return nil
|
||||
@@ -366,6 +369,9 @@ func CollectURLsProgressWithIgnoreConfig(rootPath string, globs []string, respec
|
||||
const maxSize = 2 * 1024 * 1024
|
||||
|
||||
walkFn := func(path string, d os.DirEntry, err error) error {
|
||||
if isDebugEnv() {
|
||||
fmt.Printf("::debug:: Walking path: %s\n", path)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return nil
|
||||
@@ -919,6 +925,9 @@ func CollectURLsV2(rootPath string, globs []string, respectGitignore bool, ignor
|
||||
|
||||
// Walk the filesystem
|
||||
walkFn := func(path string, d os.DirEntry, err error) error {
|
||||
if isDebugEnv() {
|
||||
fmt.Printf("::debug:: Walking path: %s\n", path)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user