Skip to content

docs: explain WithContext signature requirements - #997

Merged
antonmedv merged 1 commit into
expr-lang:masterfrom
ViktorBystrov72:docs/with-context-signatures
Nov 21, 2026
Merged

antonmedv merged 1 commit into
expr-lang:masterfrom
ViktorBystrov72:docs/with-context-signatures

Conversation

@ViktorBystrov72

Copy link
Copy Markdown
Contributor

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>
@antonmedv
antonmedv merged commit 105b8de into expr-lang:master Nov 21, 2026
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?

2 participants