From 9b0a78adda6a53e3f3497b1d347af5a081e622df Mon Sep 17 00:00:00 2001 From: "Prad Nukala (aider)" Date: Sun, 29 Dec 2024 00:42:28 -0500 Subject: [PATCH] fix: Rename DecodeWasmContext to decodeWasmContext --- vault/context/wasm.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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