summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/starlarkmw
diff options
context:
space:
mode:
Diffstat (limited to 'modules/caddyhttp/starlarkmw')
-rw-r--r--modules/caddyhttp/starlarkmw/internal/lib/module.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/caddyhttp/starlarkmw/internal/lib/module.go b/modules/caddyhttp/starlarkmw/internal/lib/module.go
index a75aedf..13c706c 100644
--- a/modules/caddyhttp/starlarkmw/internal/lib/module.go
+++ b/modules/caddyhttp/starlarkmw/internal/lib/module.go
@@ -60,7 +60,7 @@ func (r *LoadMiddleware) Run(thread *starlark.Thread, fn *starlark.Builtin, args
js := json.RawMessage(cfg.String())
- if strings.Index(name, "http.handlers.") == -1 {
+ if !strings.Contains(name, "http.handlers.") {
name = fmt.Sprintf("http.handlers.%s", name)
}
@@ -108,7 +108,7 @@ func (r *LoadResponder) Run(thread *starlark.Thread, fn *starlark.Builtin, args
js := json.RawMessage(cfg.String())
- if strings.Index(name, "http.handlers.") == -1 {
+ if !strings.Contains(name, "http.handlers.") {
name = fmt.Sprintf("http.handlers.%s", name)
}