chore(filegen): use strings.Contains for more flexible directory searching
This commit is contained in:
@@ -87,7 +87,16 @@ func FileGenerator(filters ...string) GeneratorFunc {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if filePrefix != "" && !HasPrefix(name, filePrefix) {
|
match := false
|
||||||
|
if filePrefix == "" {
|
||||||
|
match = true
|
||||||
|
} else if dirOnly {
|
||||||
|
match = strings.Contains(strings.ToLower(name), strings.ToLower(filePrefix))
|
||||||
|
} else {
|
||||||
|
match = HasPrefix(name, filePrefix)
|
||||||
|
}
|
||||||
|
|
||||||
|
if !match {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user