Skip to content

Commit

Permalink
move to validateOptions func
Browse files Browse the repository at this point in the history
  • Loading branch information
dogancanbakir committed Nov 8, 2023
1 parent 65cda33 commit 117debf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 0 additions & 5 deletions cmd/katana/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,6 @@ pipelines offering both headless and non-headless crawling.`)
}
}

if options.KnownFiles != "" && options.MaxDepth < 3 {
gologger.Info().Msgf("Depth automatically set to 3 to accommodate the `--known-files` option (originally set to %d).", options.MaxDepth)
options.MaxDepth = 3
}

cleanupOldResumeFiles()
return flagSet, nil
}
Expand Down
4 changes: 4 additions & 0 deletions internal/runner/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ func validateOptions(options *types.Options) error {
}
options.FilterRegex = append(options.FilterRegex, cr)
}
if options.KnownFiles != "" && options.MaxDepth < 3 {
gologger.Info().Msgf("Depth automatically set to 3 to accommodate the `--known-files` option (originally set to %d).", options.MaxDepth)
options.MaxDepth = 3
}
gologger.DefaultLogger.SetFormatter(formatter.NewCLI(options.NoColors))
return nil
}
Expand Down

0 comments on commit 117debf

Please sign in to comment.