mirror of
https://github.com/caddyserver/caddy.git
synced 2025-05-24 02:02:26 -04: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:]...)...)
|
newOrder = append(newOrder[:i], append([]string{dir}, newOrder[i:]...)...)
|
||||||
case After:
|
case After:
|
||||||
newOrder = append(newOrder[:i+1], append([]string{dir}, newOrder[i+1:]...)...)
|
newOrder = append(newOrder[:i+1], append([]string{dir}, newOrder[i+1:]...)...)
|
||||||
|
case First, Last:
|
||||||
}
|
}
|
||||||
break
|
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 "")
|
// 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 app.subscriptions[eventName] != nil {
|
||||||
|
|
||||||
for _, handler := range app.subscriptions[eventName][moduleID] {
|
for _, handler := range app.subscriptions[eventName][moduleID] {
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
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
|
// iPattern and iPath are our cursors/iterator positions for each string
|
||||||
var iPattern, iPath int
|
var iPattern, iPath int
|
||||||
for iPattern < len(matchPath) && iPath < len(escapedPath) {
|
for iPattern < len(matchPath) && iPath < len(escapedPath) {
|
||||||
|
|
||||||
// get the next character from the request path
|
// get the next character from the request path
|
||||||
|
|
||||||
pathCh := string(escapedPath[iPath])
|
pathCh := string(escapedPath[iPath])
|
||||||
|
@ -378,7 +378,6 @@ func buildQueryString(qs string, repl *caddy.Replacer) string {
|
|||||||
func trimPathPrefix(escapedPath, prefix string) string {
|
func trimPathPrefix(escapedPath, prefix string) string {
|
||||||
var iPath, iPrefix int
|
var iPath, iPrefix int
|
||||||
for iPath < len(escapedPath) && iPrefix < len(prefix) {
|
for iPath < len(escapedPath) && iPrefix < len(prefix) {
|
||||||
|
|
||||||
prefixCh := prefix[iPrefix]
|
prefixCh := prefix[iPrefix]
|
||||||
ch := string(escapedPath[iPath])
|
ch := string(escapedPath[iPath])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user