Skip to content

docs: explain WithContext signature requirements - #997

Open
ViktorBystrov72 wants to merge 1 commit into
expr-lang:masterfrom
ViktorBystrov72:docs/with-context-signatures
Open

ViktorBystrov72 wants to merge 1 commit into
expr-lang:masterfrom
ViktorBystrov72:docs/with-context-signatures

Conversation

@ViktorBystrov72

Copy link
Copy Markdown

Document the compile-time signature requirement for WithContext, including signatures supplied through expr.Env or typed expr.Function registration. Clarify that the context value comes from the environment passed to each expr.Run call.

Closes #753. Documentation only.

Validation:

  • Reproduced the runtime-only function failure and exercised the working Env, per-run context, and typed Function forms.
  • go test ./patcher -run '^TestWithContext' -count=1
  • go test . -run '^ExampleWithContext$' -count=1
  • git diff --check

Signed-off-by: Виктор Быстров <anatema@bk.ru>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

expr.WithContext requires expr.Env?

1 participant