From 3b2a7ab1633f7ec45b3dfa301beea417f2710bbd Mon Sep 17 00:00:00 2001 From: AI Engineer Date: Wed, 10 Jun 2026 12:09:04 +0800 Subject: [PATCH] feat: align JS exports to PascalCase (by AI) --- js_export.go | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/js_export.go b/js_export.go index 96a11e8..ab46d9a 100644 --- a/js_export.go +++ b/js_export.go @@ -8,18 +8,16 @@ import ( func init() { jsmod.Register("api", map[string]any{ - "call": call, - "setConfig": SetConfig, - "registerAction": RegisterAction, - "registerSigner": registerSigner, + "Call": call, + "SetConfig": SetConfig, + "RegisterAction": RegisterAction, + "RegisterSigner": registerSigner, }) } // call 提供给 JS 的私有入口 func call(ctx context.Context, name string, payload any) (any, error) { - // 注意:在低代码环境中,我们可能需要将 ctx 传入以透传追踪信息给 JS 签名器。 - // 虽然 api.CallBy[any] 目前不接收 ctx,但底层的 jsRunner 钩子可以从 context 中获取信息。 - // 如果未来 jsRunner 需要 ctx,我们可以在这里通过 context.WithValue 注入。 + // 将 ctx 传入以透传追踪信息给 JS 签名器 return CallBy[any](name, payload) }