diff --git a/caddy/go.mod b/caddy/go.mod index 3982f47..63f5378 100644 --- a/caddy/go.mod +++ b/caddy/go.mod @@ -4,7 +4,7 @@ go 1.25 require ( github.com/caddyserver/caddy/v2 v2.10.2 - github.com/darkweak/wazemmes v0.0.1 + github.com/darkweak/wazemmes v0.0.2 go.uber.org/zap v1.27.0 ) diff --git a/demo/go/wasm.go b/demo/go/wasm.go index 6e3bfa5..3559ec4 100644 --- a/demo/go/wasm.go +++ b/demo/go/wasm.go @@ -21,7 +21,7 @@ func main() { } mw, _ := New(config) - handler.Host.Log(api.LogLevelInfo, fmt.Sprintf("%#v\n", mw)) + handler.Host.Log(api.LogLevelInfo, fmt.Sprintf("%#v", mw)) if err != nil { handler.Host.Log(api.LogLevelError, fmt.Sprintf("Could not load config %v", err)) os.Exit(1) diff --git a/go.go b/go.go index 757a5c7..2f70620 100644 --- a/go.go +++ b/go.go @@ -65,19 +65,19 @@ func NewWasmHandlerGo(modulepath string, moduleConfig any, poolConfiguration map wa0Rt := host.NewRuntime(wazero.NewRuntimeWithConfig(ctx, wazero.NewRuntimeConfig().WithCompilationCache(cache).WithCloseOnContextDone(true))) code, err := os.ReadFile(modulepath) if err != nil { - logger.Sugar().Infof("impossible to read the custom module: %w", err) + logger.Sugar().Infof("impossible to read the custom module: %v", err) return nil, err } customModule, err := wa0Rt.CompileModule(ctx, code) if err != nil { - logger.Sugar().Infof("impossible to compile the custom module: %w", err) + logger.Sugar().Infof("impossible to compile the custom module: %v", err) return nil, err } applyCtx, err := hostInstanciation(ctx, wa0Rt, customModule) if err != nil { - logger.Sugar().Infof("instantiating host module: %w", err) + logger.Sugar().Infof("instantiating host module: %v", err) return nil, err } @@ -89,7 +89,7 @@ func NewWasmHandlerGo(modulepath string, moduleConfig any, poolConfiguration map data, err := json.Marshal(moduleConfig) if err != nil { - logger.Sugar().Infof("marshaling config: %w", err) + logger.Sugar().Infof("marshaling config: %v", err) return nil, err } @@ -97,7 +97,7 @@ func NewWasmHandlerGo(modulepath string, moduleConfig any, poolConfiguration map mw, err := wasm.NewMiddleware(applyCtx(ctx), code, opts...) if err != nil { - logger.Sugar().Infof("creating middleware: %w", err) + logger.Sugar().Infof("creating middleware: %v", err) return nil, err }