context: replace newAfterFuncContext with a global declaration using blank identifier

newAfterFuncContext has never been used, the only reason I can imagine
for its existence is to guarantee that the implementation is correct.

It is a small cleanup and make code more idiomatic.

Change-Id: I61ee213a9284f3c3bda7f91196f3a1604babd0f6
GitHub-Last-Rev: c08bd69ef3
GitHub-Pull-Request: golang/go#71856
Reviewed-on: https://go-review.googlesource.com/c/go/+/651015
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
This commit is contained in:
Jes Cok 2025-02-20 15:10:06 +00:00 committed by Gopher Robot
parent b9630c56db
commit 458ac1b015
1 changed files with 1 additions and 3 deletions

View File

@ -20,9 +20,7 @@ type afterFuncContext struct {
err error
}
func newAfterFuncContext() context.Context {
return &afterFuncContext{}
}
var _ context.Context = (*afterFuncContext)(nil)
func (c *afterFuncContext) Deadline() (time.Time, bool) {
return time.Time{}, false