mirror of
https://github.com/edoardottt/cariddi.git
synced 2026-09-08 02:37:47 +02:00
linting
This commit is contained in:
+4
-2
@@ -97,7 +97,8 @@ type Input struct {
|
||||
StoreResp bool
|
||||
// MaxDepth specifies the maximum level the crawler will follow from the initial target URL
|
||||
MaxDepth int
|
||||
// IgnoreExtensions specifies which extensions must be ignored while scanning (Default: png,jpg,jpeg,gif,webp,woff,woff2,tiff,tif)
|
||||
// IgnoreExtensions specifies which extensions must be ignored while scanning
|
||||
// (Default: png,jpg,jpeg,gif,webp,woff,woff2,tiff,tif)
|
||||
IgnoreExtensions StringSlice
|
||||
}
|
||||
|
||||
@@ -150,13 +151,14 @@ func ScanFlag() Input {
|
||||
maxDepth := flag.Int("md", 0, "Maximum depth level the crawler will follow from the initial target URL.")
|
||||
|
||||
var ignoreExtensions StringSlice
|
||||
|
||||
flag.Var(&ignoreExtensions, "ie", "Comma-separated list of extensions to ignore while scanning")
|
||||
|
||||
flag.Parse()
|
||||
|
||||
// Default Extensions to filter
|
||||
if ignoreExtensions == nil {
|
||||
ignoreExtensions.Set(DefaultIgnoreExtensions)
|
||||
_ = ignoreExtensions.Set(DefaultIgnoreExtensions)
|
||||
}
|
||||
|
||||
result := Input{
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
sliceUtils "github.com/edoardottt/cariddi/internal/slice"
|
||||
)
|
||||
|
||||
// StringSlice is a custom flag type for []string
|
||||
// StringSlice is a custom flag type for []string.
|
||||
type StringSlice []string
|
||||
|
||||
func (s *StringSlice) String() string {
|
||||
|
||||
Reference in New Issue
Block a user