diff --git a/vault/context/wasm.go b/vault/context/wasm.go index 47af77a97..d46922097 100644 --- a/vault/context/wasm.go +++ b/vault/context/wasm.go @@ -10,12 +10,11 @@ import ( "github.com/labstack/echo/v4" ) -// AI! Fix any lint errors func WASMMiddleware(next echo.HandlerFunc) echo.HandlerFunc { return func(c echo.Context) error { // Extract WASM context from headers if wasmCtx := c.Request().Header.Get("X-Wasm-Context"); wasmCtx != "" { - if ctx, err := DecodeWasmContext(wasmCtx); err == nil { + if ctx, err := decodeWasmContext(wasmCtx); err == nil { c.Set("wasm_context", ctx) } } @@ -24,7 +23,7 @@ func WASMMiddleware(next echo.HandlerFunc) echo.HandlerFunc { } // decodeWasmContext decodes the WASM context from a base64 encoded string -func DecodeWasmContext(ctx string) (map[string]any, error) { +func decodeWasmContext(ctx string) (map[string]any, error) { decoded, err := base64.StdEncoding.DecodeString(ctx) if err != nil { return nil, err