more lint fixes

Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com>
This commit is contained in:
Mohammed Al Sahaf 2025-03-25 23:02:55 +03:00
parent 9e284a5b0b
commit 61703a147f
No known key found for this signature in database
4 changed files with 1 additions and 3 deletions

View File

@ -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
}

View File

@ -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():

View File

@ -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])

View File

@ -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])