Compare commits
3 Commits
5d866a74e3
...
974a4c79fc
Author | SHA1 | Date |
---|---|---|
Seednode | 974a4c79fc | |
Seednode | 271714f1de | |
Seednode | 55953c649b |
|
@ -117,6 +117,7 @@ Flags:
|
||||||
-b, --bind string address to bind to (default "0.0.0.0")
|
-b, --bind string address to bind to (default "0.0.0.0")
|
||||||
-c, --cache generate directory cache at startup
|
-c, --cache generate directory cache at startup
|
||||||
--cache-file string path to optional persistent cache file
|
--cache-file string path to optional persistent cache file
|
||||||
|
--case-sensitive use case-sensitive matching for filters
|
||||||
--code enable support for source code files
|
--code enable support for source code files
|
||||||
--code-theme string theme for source code syntax highlighting (default "solarized-dark256")
|
--code-theme string theme for source code syntax highlighting (default "solarized-dark256")
|
||||||
--exit-on-error shut down webserver on error, instead of just printing the error
|
--exit-on-error shut down webserver on error, instead of just printing the error
|
||||||
|
|
|
@ -42,7 +42,11 @@ func (filters *filters) apply(fileList []string) []string {
|
||||||
if filters.hasExcludes() {
|
if filters.hasExcludes() {
|
||||||
for _, exclude := range filters.excluded {
|
for _, exclude := range filters.excluded {
|
||||||
result = slices.DeleteFunc(fileList, func(s string) bool {
|
result = slices.DeleteFunc(fileList, func(s string) bool {
|
||||||
return strings.Contains(strings.ToLower(s), strings.ToLower(exclude))
|
if CaseSensitive {
|
||||||
|
return strings.Contains(s, exclude)
|
||||||
|
} else {
|
||||||
|
return strings.Contains(strings.ToLower(s), strings.ToLower(exclude))
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,7 +54,11 @@ func (filters *filters) apply(fileList []string) []string {
|
||||||
if filters.hasIncludes() {
|
if filters.hasIncludes() {
|
||||||
for _, include := range filters.included {
|
for _, include := range filters.included {
|
||||||
result = slices.DeleteFunc(fileList, func(s string) bool {
|
result = slices.DeleteFunc(fileList, func(s string) bool {
|
||||||
return !strings.Contains(strings.ToLower(s), strings.ToLower(include))
|
if CaseSensitive {
|
||||||
|
return !strings.Contains(s, include)
|
||||||
|
} else {
|
||||||
|
return !strings.Contains(strings.ToLower(s), strings.ToLower(include))
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
ReleaseVersion string = "0.92.0"
|
ReleaseVersion string = "0.92.2"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -49,9 +49,9 @@ func splitQueryParams(query string, regexes *regexes) []string {
|
||||||
for i := 0; i < len(params); i++ {
|
for i := 0; i < len(params); i++ {
|
||||||
switch {
|
switch {
|
||||||
case regexes.alphanumeric.MatchString(params[i]) && CaseSensitive:
|
case regexes.alphanumeric.MatchString(params[i]) && CaseSensitive:
|
||||||
results = append(results, strings.ToLower(params[i]))
|
|
||||||
case regexes.alphanumeric.MatchString(params[i]):
|
|
||||||
results = append(results, params[i])
|
results = append(results, params[i])
|
||||||
|
case regexes.alphanumeric.MatchString(params[i]):
|
||||||
|
results = append(results, strings.ToLower(params[i]))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue