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
-rw-r--r--modules/caddyhttp/starlarkmw/starlarkmw.go6
2 files changed, 5 insertions, 5 deletions
diff --git a/modules/caddyhttp/starlarkmw/internal/lib/module.go b/modules/caddyhttp/starlarkmw/internal/lib/module.go
index a7164cd..a75aedf 100644
--- a/modules/caddyhttp/starlarkmw/internal/lib/module.go
+++ b/modules/caddyhttp/starlarkmw/internal/lib/module.go
@@ -64,7 +64,7 @@ func (r *LoadMiddleware) Run(thread *starlark.Thread, fn *starlark.Builtin, args
name = fmt.Sprintf("http.handlers.%s", name)
}
- inst, err := r.Ctx.LoadModule(name, js)
+ inst, err := r.Ctx.LoadModuleByID(name, js)
if err != nil {
return starlark.None, err
}
@@ -112,7 +112,7 @@ func (r *LoadResponder) Run(thread *starlark.Thread, fn *starlark.Builtin, args
name = fmt.Sprintf("http.handlers.%s", name)
}
- inst, err := r.Ctx.LoadModule(name, js)
+ inst, err := r.Ctx.LoadModuleByID(name, js)
if err != nil {
return starlark.None, err
}
diff --git a/modules/caddyhttp/starlarkmw/starlarkmw.go b/modules/caddyhttp/starlarkmw/starlarkmw.go
index 007ddb4..47e335d 100644
--- a/modules/caddyhttp/starlarkmw/starlarkmw.go
+++ b/modules/caddyhttp/starlarkmw/starlarkmw.go
@@ -7,8 +7,8 @@ import (
"github.com/caddyserver/caddy/v2"
"github.com/caddyserver/caddy/v2/modules/caddyhttp"
- caddyscript "github.com/caddyserver/caddy/v2/pkg/caddyscript/lib"
"github.com/caddyserver/caddy/v2/modules/caddyhttp/starlarkmw/internal/lib"
+ caddyscript "github.com/caddyserver/caddy/v2/pkg/caddyscript/lib"
"github.com/starlight-go/starlight/convert"
"go.starlark.net/starlark"
)
@@ -34,8 +34,8 @@ type StarlarkMW struct {
// CaddyModule returns the Caddy module information.
func (StarlarkMW) CaddyModule() caddy.ModuleInfo {
return caddy.ModuleInfo{
- Name: "http.handlers.starlark",
- New: func() caddy.Module { return new(StarlarkMW) },
+ ID: "http.handlers.starlark",
+ New: func() caddy.Module { return new(StarlarkMW) },
}
}