mirror of
https://github.com/caddyserver/caddy.git
synced 2025-04-16 16:19:15 +08:00
more lint fixes
Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com>
This commit is contained in:
parent
9e284a5b0b
commit
61703a147f
@ -178,6 +178,7 @@ func RegisterDirectiveOrder(dir string, position Positional, standardDir string)
|
||||
newOrder = append(newOrder[:i], append([]string{dir}, newOrder[i:]...)...)
|
||||
case After:
|
||||
newOrder = append(newOrder[:i+1], append([]string{dir}, newOrder[i+1:]...)...)
|
||||
case First, Last:
|
||||
}
|
||||
break
|
||||
}
|
||||
|
@ -273,7 +273,6 @@ func (app *App) Emit(ctx caddy.Context, eventName string, data map[string]any) E
|
||||
|
||||
// implement propagation up the module tree (i.e. start with "a.b.c" then "a.b" then "a" then "")
|
||||
for app.subscriptions[eventName] != nil {
|
||||
|
||||
for _, handler := range app.subscriptions[eventName][moduleID] {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
|
@ -549,7 +549,6 @@ func (MatchPath) matchPatternWithEscapeSequence(escapedPath, matchPath string) b
|
||||
// iPattern and iPath are our cursors/iterator positions for each string
|
||||
var iPattern, iPath int
|
||||
for iPattern < len(matchPath) && iPath < len(escapedPath) {
|
||||
|
||||
// get the next character from the request path
|
||||
|
||||
pathCh := string(escapedPath[iPath])
|
||||
|
@ -378,7 +378,6 @@ func buildQueryString(qs string, repl *caddy.Replacer) string {
|
||||
func trimPathPrefix(escapedPath, prefix string) string {
|
||||
var iPath, iPrefix int
|
||||
for iPath < len(escapedPath) && iPrefix < len(prefix) {
|
||||
|
||||
prefixCh := prefix[iPrefix]
|
||||
ch := string(escapedPath[iPath])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user