Skip to content

context: fix doc for WithDeadlineCause and WithTimeoutCause#77644

Open
kovan wants to merge 1 commit intogolang:masterfrom
kovan:fix-context-doc-77478
Open

context: fix doc for WithDeadlineCause and WithTimeoutCause#77644
kovan wants to merge 1 commit intogolang:masterfrom
kovan:fix-context-doc-77478

Conversation

@kovan
Copy link
Contributor

@kovan kovan commented Feb 16, 2026

Summary

  • The package doc incorrectly stated that WithCancelCause, WithDeadlineCause, and WithTimeoutCause all return a CancelCauseFunc
  • Only WithCancelCause returns CancelCauseFunc. WithDeadlineCause and WithTimeoutCause accept the cause as a parameter and return a plain CancelFunc
  • Updated the wording to accurately describe each function's behavior

Fixes #77478

🤖 Generated with Claude Code

The package doc incorrectly stated that WithCancelCause,
WithDeadlineCause, and WithTimeoutCause all return a CancelCauseFunc.
In reality, only WithCancelCause returns a CancelCauseFunc.
WithDeadlineCause and WithTimeoutCause accept the cause as a
parameter and return a plain CancelFunc.

Fixes golang#77478

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change-Id: I6fb7510899beacd4cddb48dfaa13df54db9defda
@google-cla
Copy link

google-cla bot commented Feb 16, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

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.

context: incorrect description of WithDeadlineCause and WithTimeoutCause

1 participant