mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-29 13:21:55 +02:00
fixed loadbalancer with idlewatcher, fixed reload issue
This commit is contained in:
@@ -13,7 +13,7 @@ type (
|
||||
|
||||
var pathPattern = regexp.MustCompile(`^(/[-\w./]*({\$\})?|((GET|POST|DELETE|PUT|HEAD|OPTION) /[-\w./]*({\$\})?))$`)
|
||||
|
||||
func ValidatePathPattern(s string) (PathPattern, E.NestedError) {
|
||||
func ValidatePathPattern(s string) (PathPattern, E.Error) {
|
||||
if len(s) == 0 {
|
||||
return "", E.Invalid("path", "must not be empty")
|
||||
}
|
||||
@@ -23,7 +23,7 @@ func ValidatePathPattern(s string) (PathPattern, E.NestedError) {
|
||||
return PathPattern(s), nil
|
||||
}
|
||||
|
||||
func ValidatePathPatterns(s []string) (PathPatterns, E.NestedError) {
|
||||
func ValidatePathPatterns(s []string) (PathPatterns, E.Error) {
|
||||
if len(s) == 0 {
|
||||
return []PathPattern{"/"}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user